You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Having a dot inside the directory path breaks copy/paste of file #464
Having a dot inside the directory path breaks copy/paste of files. It seems atom tries to append a number before the first dot it finds. This should not be done with the full path but just the file name and also the last and not first dot should be used.
Error: EACCES: permission denied, mkdir '/home/f0.ludwig'
at Error (native)
at Object.fs.mkdirSync (fs.js:791:18)
at sync (/usr/share/atom/resources/app.asar/node_modules/fs-plus/node_modules/mkdirp/index.js:55:12)
at sync (/usr/share/atom/resources/app.asar/node_modules/fs-plus/node_modules/mkdirp/index.js:61:24)
at sync (/usr/share/atom/resources/app.asar/node_modules/fs-plus/node_modules/mkdirp/index.js:61:24)
at sync (/usr/share/atom/resources/app.asar/node_modules/fs-plus/node_modules/mkdirp/index.js:61:24)
at sync (/usr/share/atom/resources/app.asar/node_modules/fs-plus/node_modules/mkdirp/index.js:61:24)
at sync (/usr/share/atom/resources/app.asar/node_modules/fs-plus/node_modules/mkdirp/index.js:61:24)
at sync (/usr/share/atom/resources/app.asar/node_modules/fs-plus/node_modules/mkdirp/index.js:61:24)
at Function.sync (/usr/share/atom/resources/app.asar/node_modules/fs-plus/node_modules/mkdirp/index.js:61:24)
at Object.fsPlus.writeFileSync (/usr/share/atom/resources/app.asar/node_modules/fs-plus/lib/fs-plus.js:278:14)
at TreeView.module.exports.TreeView.pasteEntries (/usr/share/atom/resources/app.asar/node_modules/tree-view/lib/tree-view.js:965:32)
at space-pen-div.atom.commands.add.tree-view:paste (/usr/share/atom/resources/app.asar/node_modules/tree-view/lib/tree-view.js:277:26)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:238:29)
at CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:3:61)
at CommandRegistry.module.exports.CommandRegistry.dispatch (/usr/share/atom/resources/app.asar/src/command-registry.js:153:19)
Just copy/paste a file inside a folder that contains a "."
In my case it is the folder "/home/f.ludwig/some/place/my_file.txt". tree-view tries to create a "/home/f0.ludwig/some/place/my_file.txt" but really should "/home/f.ludwig/some/place/my_file0.txt"
Reproduce the problem with
mkdir foo.bar
cd foo.bar
touch my_file.txt
atom .
in atom copy & paste my_file.txt and you get a new folder called "foo0.bar"
To reproduce the traceback:
mkdir test
cd test
mkdir foo.bar
chmod -w .
cd foo.bar
touch my_file.txt
atom .
in atom copy & paste my_file.txt and you get the traceback
I believe this is caused by the duplicate filename algorithm. Haven't had time to check, but it's likely doing something a little bit too naive with regards to path splitting.
I just experienced a related problem with a file named mychange.up.sql, copy and pasting that file creates a new file named mychange0.up(without the .sql extension). I haven't checked if #649 fixes this. I will check later today.
Activity
lee-dohm commentedon Jun 4, 2015
Can you give some steps to reproduce this issue? I'm not clear on how it is you came to this error.
FlorianLudwig commentedon Jun 4, 2015
Just copy/paste a file inside a folder that contains a "."
In my case it is the folder "/home/f.ludwig/some/place/my_file.txt". tree-view tries to create a "/home/f0.ludwig/some/place/my_file.txt" but really should "/home/f.ludwig/some/place/my_file0.txt"
Reproduce the problem with
in atom copy & paste my_file.txt and you get a new folder called "foo0.bar"
To reproduce the traceback:
in atom copy & paste my_file.txt and you get the traceback
thomasjo commentedon Jun 4, 2015
I believe this is caused by the duplicate filename algorithm. Haven't had time to check, but it's likely doing something a little bit too naive with regards to path splitting.
izuzak commentedon Jun 9, 2015
Yeah, looks like a problem here -- I was able to reproduce this. Thanks for the detailed steps, @FlorianLudwig. 🙇
software-opal commentedon Feb 23, 2016
I just experienced a related problem with a file named
mychange.up.sql, copy and pasting that file creates a new file namedmychange0.up(without the.sqlextension). I haven't checked if #649 fixes this. I will check later today.