Skip to content

*CRITICAL data loss* shell.cp() Content of file is erased when trying to copy it to the folder it already belongs to #678

@dperetti

Description

@dperetti

Node version (or tell us if you're using electron or some other framework):

7.5.0

ShellJS version (the most recent version/Github branch you see the bug on):

0.7.5

Operating system:

Mac OS X

Description of the bug:

If you try to copy a file to the folder it already belongs to, the content of the file is erased.

Example ShellJS command to reproduce the error:

echo "blah" > /home/test
shell.cp('/home/test', '/home')
cat /home/test

/home/test is now empty.

Metadata

Metadata

Assignees

Labels

fixBug/defect, or a fix for such a problem

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions