-
Notifications
You must be signed in to change notification settings - Fork 168
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
Deep folders can not be renamed while Gaze is watching #249
Comments
I can rename folders while gaze is watching. |
Can you do it under Windows? |
@kireerik We could probably save a lot of time if you post repro steps and more information about your environment and issue you are running into. |
This is the minimal code where the issue is reproducible: const {Gaze} = require('gaze')
new Gaze('watchedDirectory' + '/**') If I try to edit a folder name within a watched folder for example using Windows' file manager then I am getting an error prompt like this:
So it can not be renamed while Gaze is watching. |
Windows version? Node.js version? Are you watching files from a vagrant things or shared folder or dropbox, etc Also gaze watches file patterns, so instead of doing |
Windows I see. |
Nothing else running that could be holding those files? FWIW, we have tests that rename files gaze is watching that passes on Windows and this is the first Ive heard of this issue. |
No, nothing else. As soon as I stop Gaze I can rename a folder. As I can see the linked test is for renaming a file and not a folder. I think Gaze is probably watching all files through watching the sub folders recursively or something like that. |
Renaming an empty folder works mostly, but for the 2. renaming I get the following error: events.js:167
throw er; // Unhandled 'error' event
^
Error: ENOENT: no such file or directory, watch 'site\folder\'
at FSWatcher.start (fs.js:1409:26)
at Object.fs.watch (fs.js:1446:11)
at Gaze._watchDir (node_modules\gaze\lib\gaze.js:314:30)
at node_modules\gaze\lib\gaze.js:387:10
at iterate (node_modules\gaze\lib\helper.js:69:5)
at node_modules\gaze\lib\helper.js:78:11
at node_modules\gaze\lib\gaze.js:452:5
at iterate (node_modules\gaze\lib\helper.js:69:5)
at node_modules\gaze\lib\helper.js:78:11
at node_modules\gaze\lib\gaze.js:452:5
Emitted 'error' event at:
at Gaze.emit (node_modules\gaze\lib\gaze.js:102:32)
at Gaze._handleError (node_modules\gaze\lib\gaze.js:468:15)
at Gaze._watchDir (node_modules\gaze\lib\gaze.js:331:17)
at node_modules\gaze\lib\gaze.js:387:10
[... lines matching original stack trace ...]
at node_modules\gaze\lib\gaze.js:452:5
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
A non empty folder gives the above error as well, but right away with the 1. renaming. Adding an empty folder within the |
I think we should keep this issue opened, since it is well defined by now and it is also consistently reproducible. |
Sure I'll reopen and assign to you. I cannot repro. |
All right, thank you! May I ask you on which system can you not reproduce this? (This might helps you to reproduce, if it is an issue on your system as well: #249 (comment)) |
Minimal directory structure:
<-
can not rename while Gaze watching<-
can rename with errorThe text was updated successfully, but these errors were encountered: