-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
delete problems when watching a folder structure under windows #77
Comments
Just in case it's relevant, how are you trying to delete the folder? The command line or through the Windows file explorer? |
With the Windows Explorer.
It will delete the hole content in folderA but folderA keeps existing. A secound rmdir removes the folderA. When delete with command, a very long execption occure (from watchr) an crashes. |
I can confirm a similar problem and provide a test case and some output. Here's a sample program that works in Linux:
but when run on Windows (10), node errors out with the following message when the nested directory is deleted:
Something to do with a TaskGroup Task being marked as completed more than once. Perhaps being able to set the Task's |
I have been having exactly the same issue as described by the OP. My issue is not just about the delete process, when there are child directories it will prevent the parent directory being renamed because it is open by another process! For instance
It looks at though as soon as a watcher is created for a directory you cannot remove or amend its parent. But if you delete the child directory first you can delete or rename it. This only seems to happen on windows, I have tested in Linux (Debian) and OSX and both work fine. Apart from this issue this library works exactly how I need it to. Is there any way to fix it? |
v3.0.0 was just released which is a major rewrite, can you give it a go, as I suspect it will resolve this issue 👍 Happy to re-open if not Sorry for the late response on this, 2014 and 2015 were hard years for me! |
@balupton Sorry I know you have rewritten this, I have tested this on windows and I am still getting the same errors as before. You cannot modified directories that contain sub directories. If the directory only contains a file it works fine. This will be happening because it will be keeping an open process monitoring that sub directory and when you try to change the name or delete it you can't. I think this is more of an OS level issue than a problem with your code so I am not sure how you can even get around this issue. This is also happening on a lot of other node filesystem libraries that I have tried. |
Hrmm. Not sure what can be done about it. Does the same issue occur with https://github.com/facebook/watchman - windows support at facebook/watchman#19 - as they use an entirely different method of watching, and I'm planning of writing a new package that where if watchman is available we use that, otherwise we use watchr /cc @mic2100 |
Seems a limitation of Node.js. Use watchman #91 |
Hello,
I have an problem with Windows 7/64 and node 0.10.37. When i watch a folder with a structure (e.g.):
/folderA/folderB/fileA.txt
/folderA/folderB/fileB.txt
/folderA/fileA.txt
/fileA.txt
It is not possible to delete folderA. But when I delete FolderB it is possible to delete folderA.
In general it is not possible to delete folders if the folder contains at least one another folder. When stopping the script i can delete all with out problems.
Thanks for help,
Dennis
The text was updated successfully, but these errors were encountered: