-
Notifications
You must be signed in to change notification settings - Fork 361
Including a colon in a file or folder name #1207
Description
Prerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
Creating a new file and naming it with a colon (:
) results in a file named with the text to the left of the colon, and a tab showing the entire name. Adding and saving any content to the open tab will be lost. And opening the file that was created will show an empty file. Reproducible in safe mode.
Attempting to create a new folder named with a colon will show an "EEXISTS" error. Escaping the colon (\:
) results in a folder named with the text to the left of the colon being created and a persistent "EEXIST" message. Reproducible in safe mode.
This is similar to #548, and this also appears to be a problem in git and GitHub for windows when cloning a wiki that contains file names with colons.
Steps to Reproduce
New file: If I perform the following steps:
- Right click in the tree-view and create a new file.
- Name the file
foo:bar
. - You'll see the new file is named
foo
, the tab shows the namefoo:bar
. - Enter anything into the open tab, save & close.
- Open
foo
from the tree-view and you'll find an empty file.
New folder:
- Right click in the tree-view and create a new folder.
- Name the folder
testing:1
(just not anything starting with "foo"). - You'll see an "EEXIST: file already exists" message.
- Change the folder name to
testing\\:1
. - A new folder named
testing
will appear, but the "EEXIST" message will persist.
Expected behavior:
I would expect a message reporting that :
and \
are not valid characters in Windows file and folder names; / & ? " < > |
are also invalid.
Actual behavior:
When a created file is named with a colon, there is an inconsistency between the tree-view and named tab. Adding content to the tab will result in lost work.
When attempting to create a folder named with a colon, an "EEXIST" message persists, and when the colon is escaped, a folder is created with the text that is to the left of the colon.
Reproduces how often:
100%
Versions
$ atom --version
Atom : 1.22.1
Electron: 1.6.15
Chrome : 56.0.2924.87
Node : 7.4.0
$ apm --version
internal/child_process.js:313
throw errnoException(err, 'spawn');
^
Error: spawn UNKNOWN
at exports._errnoException (util.js:1022:11)
at ChildProcess.spawn (internal/child_process.js:313:11)
at exports.spawn (child_process.js:380:9)
at EventEmitter.<anonymous> (C:\Users\Wakko\AppData\Local\atom\app-1.22.1\resources\app\apm\lib\apm-cli.js:150:17)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
I'm not sure why apm --version
isn't working, but I uninstalled and reinstalled Atom; I did not use clear-window-state
.
Windows 10 64-bit v10.0.16299