You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I just noticed a small issue with renaming files. I think it might be my error, but just in case it isn't, I thought I'd post it. Perhaps someone can test it on their system and see if they are getting the same results.
I'm running on 64-bit Windows 10. I have not tested it on other operating systems (sorry =/).
The steps I take to cause the error are the following.
Watch the current directory with chokidar (the error appears even if you don't watch the current directory, but for the simplicity of testing, let's say it's the current one).
Create a folder in that directory. We'll call that Created_Folder_1.
Create another folder inside of that folder. We'll call that Created_Folder_2.
Attempt to rename Created_Folder_1.
You should see a Windows prompt saying that a program is currently using the folder and so it can't be renamed (if you are using an IDE like VSCode, it may not show that error, but in both cases, the file can't be renamed, and no add or unlink event is thrown by chokidar).
It's a known quirk of the Windows API for file watching, as exposed by the node.js core method fs.watch(). You could try setting the usePolling: true option in chokidar to switch to watching based on stat polling as provided by fs.watchFile(), although there is a performance penalty. Your watch target seems relatively small, so you may not notice the difference.
Hey, I just noticed a small issue with renaming files. I think it might be my error, but just in case it isn't, I thought I'd post it. Perhaps someone can test it on their system and see if they are getting the same results.
I'm running on 64-bit Windows 10. I have not tested it on other operating systems (sorry =/).
The steps I take to cause the error are the following.
Here's the file I use in order to test this:
Here's the error that I see if I do it from the regular File Explorer UI:
If you do it in VSCode there is no immediate error, but the rename is not accepted.
Eventually though an error appears:
This does not effect non-nested files at all. So I could renamed Created_Folder_2 with no problems.
Thanks for your help on this. And I hope this post provided enough info... it's my first time doing this. :)
The text was updated successfully, but these errors were encountered: