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.

When copy/paste same named file, new folder is created above working dir, dangerous #674

Closed

Description

@freed00m

Hi, I have a working directory, (project's directory openned with atom)

/home/frdm/gDrive/3.1__Tretak ZS/ZSUR/zsur-sp

And when I try copy+paste a file from sidebar tree-view, in my case file

/home/frdm/gDrive/3.1__Tretak ZS/ZSUR/zsur-sp/app/source/data.txt

to (note that it will not fail when no "data.txt" file is inside)

/home/frdm/gDrive/3.1__Tretak ZS/ZSUR/zsur-sp/tomas/Skripty/

What should happen?
Nothing or maybe warning or overwrite confirmation dialog.

What happens instead.
A new directory tree is created outside working directory (note that data has no postfix ".txt")

/home/frdm/gDrive/30.1__Tretak ZS/ZSUR/zsur-sp/tomas/Skripty/data

From my point of view it is completely dangerous behavior.


Arch linux with a kernel 4.3.1 and I am using systemd 228

Atom version 1.3.1

Activity

  1. dolan-a commented on Dec 15, 2015

    @dolan-a

    +1. This is really annoying. It looks like the problem occurs when a directory name starts with a number.

    In my case, I have 1.data/data.txt. When I copy data.txt and paste it into 1.data/, I expect 1.data/data0.txt to get created. Instead, 10.data/data.txt gets created in the parent that contains 1.data/. Thus, the behavior should be that it creates a new version of the file in the same directory.

  2. freed00m commented on Dec 15, 2015

    @freed00m
    Author

    @pydolan yes, so when directory has number in them, it can happen above working dir. Lucky for us it does not overwrite another files, but can for some people create problems when random directories/files are spawned inside other projects.

  3. dolan-a commented on Dec 15, 2015

    @dolan-a

    It looks like this may be related to #649.

  4. Ajedi32 commented on Jul 8, 2016

    @Ajedi32

    This problem manifests itself for me as an error:

    Unable to paste paths. EPERM: operation not permitted, mkdir

    And yes, it looks like #649 should fix it. b6abd9c, maybe? I'm not actually sure which exact commit solves this particular problem, looks like there were a lot of things changed related to the correct placement of the incremented number for duplicate files.

    Unfortunately it looks like Atom core is still using v0.205.0 of tree-view, so the bug isn't fixed there yet. It will be fixed once Atom upgrades to tree-view v0.207.0 or newer.

  5. winstliu commented on Jul 8, 2016

    @winstliu
    Contributor

    Fixed by #649, should be in Atom 1.9.0. Thanks for the heads-up @Ajedi32!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions