Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Including a colon in a file or folder name #1207

@Mottie

Description

@Mottie

Prerequisites

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 name foo: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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions