Comments (7)
Hi, I wasn't able to reproduce this issue.
Firstly, cfiles
bookmarks directories and not files and forward slash is not a valid character for directory names (atleast in ext4).
Secondly, I tried making a directory named test\na:Public
and bookmarked it to z. Then I pressed ' + z to go to test\na:Public
and it worked.
You can see this terminal cast for example. Thanks!
from cfiles.
I see the issue, it's not a forward slash, it's a newline "\n".
You may create it using the following shell command:
mkdir 'test'$'\n''a:Public'
Then go in this directory and bookmark it. I definitely could reproduce the issue in the latest version.
from cfiles.
You are right, the issue exists. How can I encode \n
? To be clear I mean what would I encode it too?
from cfiles.
I'd replace it with something that isn't allowed in a filename... Since you only ever take paths from the system maybe a double slash?
z:/tmp/test//a:Public
The worst that can happen is if you take a path from the user and she provides it with a double slash (which is valid but is reduced by the system to only one slash) but I can't see that happening in the case of bookmarks.
Either that or use an encoding convention, either limited such as saying "TheΒ % sign is followed by two characters giving the ascii code of the character, \n becomes %0A, % becomes %25" (url encoding), or go full encoding by storing base64 for example.
EDIT: I'm really not fan of the double-slash solution. I had a look at my bookmarks and saw a path starting by //, so I must have entered it somehow outside of related tests. My assumption that it can't happen seems flawed, I'd go with something like % encoding instead.
from cfiles.
There was a bug due to which paths used to start with //
instead of /
after visiting the root directory once. I fixed this in 666a935. So is the double slash solution good enough now?
from cfiles.
I think so, and if it ever comes back to be an issue it'll still be time to change.
from cfiles.
I went with the double slash solution. rev 72771db has the relevant changes. Let me know if it has any errors.
Also sorry for the late reply, I have been getting a lot work from my uni.
from cfiles.
Related Issues (20)
- Can't preview image. HOT 3
- Build fails on powerpc 32 bit: 'for' loop initial declaration used outside C99 mode HOT 2
- Error with preview. HOT 2
- Strange behavior opening bash scripts (xdg-open, vim) HOT 17
- Can you add a keybind to create a new folder/file HOT 1
- Auto-reload
- Enhancement: add a help tabble for shortcuts.
- Enhancement: Add a toggle to turn off file preview
- enhancement HOT 1
- Enhancement: copy a file into the same folder
- Enhancement: separate keys to go to next folder and open a file
- error previewing lost+found and root directory
- Preview window/process left open after exit
- BUG Consume all the RAM memory
- Unable to delete folder with same name of a file in trash
- Don't preview zip file after preview pdf
- Images off center on ST terminal HOT 1
- Support transparency
- Crash while move with KEY_UP and KEY_DOWN
- cyrillic folder names are not displayed correctly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cfiles.