file-watcher icon indicating copy to clipboard operation
file-watcher copied to clipboard

Doesn't work if file is deleted and created again.

Open dyyybek opened this issue 9 years ago • 3 comments

I'm working on an ePub and very often unzip it to edit it's contents. It involves using a script to unzip the .epub package. The script gets rid of the old folder first and then creates a new one with the same name. I understand that file-watcher is just loosing track of the original files therefore it's not reporting any changes in the files. It would be nice to have this functionality. Even worse is that atom itself requires to close the current file and open it again from tree view.

To reproduce:

  1. create a folder "test"
  2. create a file "test.txt" inide "test" folder
  3. open the file in atom using the tree view, type in some text, save file
  4. delete the folder "test" and it's contents
  5. create the folder "test" again
  6. create the file "test.txt" inside "test" folder again
  7. switch back to atom (there are no prompts that the files were changed or deleted)
  8. do not close the file in atom – try to open the same file from the tree view (it brings the focus to your opened file but your not really editing the file from the tree view)
  9. to edit the new "test.txt" file: close the file in atom. open it again with tree view.

I hope you see the problem. I'm not sure if it's atom's issue but i hope you could add this functionality to you plugin. Cheers!

dyyybek avatar Aug 08 '16 15:08 dyyybek

Hm, I might be able to listen for the deleted event from pathwatcher and prompt to do something. However, it looks like this is an issue with how node/atom treats files overall.

lwblackledge avatar Aug 08 '16 20:08 lwblackledge

This is a duplicate of #19 isn't it? (Or at least, very closely related.)

MartinBonner avatar Mar 22 '17 15:03 MartinBonner

I use google log to a file. And the logs get rolled everytime I build and run my program. Hope this can be implemented.

xgdgsc avatar Jan 24 '18 13:01 xgdgsc