Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

[File watchers] Externally copied file appears twice in watched folder #6537

Closed
bchintx opened this issue Jan 15, 2014 · 5 comments
Closed

Comments

@bchintx
Copy link
Contributor

bchintx commented Jan 15, 2014

On Win7, if I copy-paste a file into a watched folder, the containing folder expands automatically to show two entries for the new file. Deleting the file from disk leaves an orphaned entry in the project list.

Steps to Reproduce:

  1. Follow steps 1 thru 6 of the Brackets Smoke Tests

Observed:
At step 6, the 'watcher' folder does automatically expand as soon as the README.md file is added to the 'watcher' folder via File Explorer. The expanded watcher folder contains two entries for README.md.

Continued Steps to Reproduce:
2. Delete the copied file README.md from the watcher folder using File Explorer. Notice that only one entry is deleted from the project tree in Brackets.
3. Click on that one entry, and Brackets displays the "Error opening file" message box.

The orphaned entry doesn't go away until you restart Brackets.

@ghost ghost assigned jasonsanjose Jan 15, 2014
@jasonsanjose
Copy link
Member

Reproduced, but only on windows with build 0.36.0-11405.

@jasonsanjose
Copy link
Member

Well this is a little unsettling... cc @iwehrman. I followed the smokes steps and boiled it down to this:

  1. Create new folder (which defaults to "New Folder")
  2. Rename to watch
  3. Rename to watchers
  4. Paste in README.md

After that, I get this error below

Unable to stat changed path:  C:/Users/jasonsj/GitHub/brackets/samples/root/Getting Started/New folder/README.md NotFound

That tells me that something at the file system got really messed up. The original path New folder is still around when it should be watchers.

@jasonsanjose
Copy link
Member

Immediately after pasting README.md here are the list of _pendingChanges:

["C:/Users/jasonsj/GitHub/brackets/samples/root/Getting Started/New folder/",
"C:/Users/jasonsj/GitHub/brackets/samples/root/Getting Started/watch/",
"C:/Users/jasonsj/GitHub/brackets/samples/root/Getting Started/watchers/",
"C:/Users/jasonsj/GitHub/brackets/samples/root/Getting Started/watchers",
"C:/Users/jasonsj/GitHub/brackets/samples/root/Getting Started/New folder/README.md",
"C:/Users/jasonsj/GitHub/brackets/samples/root/Getting Started/watch/README.md",
"C:/Users/jasonsj/GitHub/brackets/samples/root/Getting Started/watchers/README.md"]

@peterflynn
Copy link
Member

FBNC @bchintx

@ingorichter
Copy link
Contributor

@peterflynn @jasonsanjose the original issue seems to be resolved. The only thing that concerns me at this point, is the fact that things get messy once you start renaming the created folder and copy/move/delete files from/into this folder. I assume you already have an issue filed for it, right?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants