-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CLOSED] Right-clicking and creating new files or folders doesn't resolve paths for .. and / #10071
Comments
Comment by tallandroid Works for me on mac. I created both a file and a folder with prefix to be .. in a subfolder. Both got created in the parent folder. However , the UI shows this Can you confirm if the directory structure is as expected in the file system. In that case , its a bug with the File Tree UI. |
Comment by petetnt Nice find! I like how it sort of works how you would expect it to regarding creating files with relative paths and it also sort of works how you would expect it to work if they were just filenames. Another case that brings really weird behavior is naving a file I'd say the expected behavior would be showing a "filename cannot contain error", something similar to this Windows example: |
Comment by humphd
|
Comment by petetnt
|
Comment by tallandroid Submitted a pull request : adobe/brackets#11862 As The reason being, the validation checks for the basename of the file which strips out the The pull request does change the inherent behavior of FileUtils.baseName though. It makes sense , cos if the fullpath contains the parent relative path , it should be returned along with the baseName. I preferred this over the option of creating a new function like |
Comment by tallandroid This can be closed now. |
Issue by humphd
Thursday Aug 20, 2015 at 02:12 GMT
Originally opened as adobe/brackets#11609
It's possible to right-click in the file tree and create a file (or filder) named
../something
or just..
, and the path isn't resolved, but rather the..
and/
characters are treated as literals to be used in the filename itself.First discovered by
@
Pomax in https://github.com/humphd/brackets/issues/434, and now I'm filing upstream, since this is really a bug in Brackets.The text was updated successfully, but these errors were encountered: