-
Notifications
You must be signed in to change notification settings - Fork 107
File can't be found if "/" is in file name. #286
Comments
forward slash is problematic, it is used as a folder separator and cannot be escaped. |
I... see what you mean. When it splits the path to navigate, it does a naive split (see rmapi/path.go) The only solution I can see that would fix this would be to add an argument that would tell stat, rm, etc to ignore the forward slash. This would work for current folder operations, but not really anything deeper An extension of this idea to allow for accessing deeper into the file structure is that spaces get used instead of forward slashes to delineate folders, and so each folder before the final folder/file gets entered as a separate argument into the shell command rather than splitting later on. Spaces already need to be escaped anyway if they are in a file/folder name to avoid creating a new argument, so this would solve the problem rather neatly. This doesn't need to be the default behavior, so as mentioned before an argument could be passed that would use this alternative method. |
Proof of concept for using arguments to separate folders and files rather than "/": Rewriting statCmd in shell/stat.go
Adding function to filetree/filetree.go
This works and gave me the stats for a file with "/" in its name. It also works when working multiple folders deep. |
Maybe we could use a combination of grave ( Frankly this would reduce the number of incompatible files by a LOT. who uses & and |
As in the title. I have numerous files that have the forward slash character in the title. It shows up when I use ls, however attempting to use stat or get on those files gives an error saying that the file doesn't exist.
I have tried escaping the forward slash, but even that hasn't worked.
EDIT: Anything with a ' also encounters an error, specifically "Error: EOF found when expecting closing quote". Escaping this one does work, but it'll need fixing in the autocomplete.
The text was updated successfully, but these errors were encountered: