Skip to content
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

Folder not allowed to Rename #1281

Open
proy1121 opened this issue May 8, 2023 · 1 comment
Open

Folder not allowed to Rename #1281

proy1121 opened this issue May 8, 2023 · 1 comment

Comments

@proy1121
Copy link

proy1121 commented May 8, 2023

While watching folder which has subfolders using Chokidar,The watch folder cannot be renamed.

Versions

  • Chokidar version : 3.5.2
  • Node version : 16.17.0
  • OS version : Windows 10

To Reproduce:
Step 1 : Watch any folder, say Test 1 using chokidar.
Step 2 : Created another folder inside Test 1 say Test 2
Step 3 : Trying renaming Test 2
Step 4 : You should see a Windows prompt "Folder in use" and "The action can't be completed because the folder or file in it is open in another application.

renameChowkidar

//defaultOptions for chokidar :
defaultOptions = {
ignored: /(^|[/\])../, // ignore dotfiles
persistent: true,
depth: 99,
alwaysStat: true,
awaitWriteFinish: {
stabilityThreshold: 2000,
pollInterval: 100
},
ignorePermissionErrors: false,
atomic: true // or a custom 'atomicity delay', in milliseconds (default 100)
}

Expected behavior
When a sub-folder is deleted it should get deleted and should not depend on whether its Parent is being watched or not by chowkidar

We think root cause would be the same that would folder permissions or folder in use.

NOTE : Similarly if the sub-folder is non empty ,User is not allowed to delete it and User get prompt "Folder Access Denied" and You'll need to provide administrator permission to delete this folder.
deleteChowkidar

@Larmian
Copy link

Larmian commented Jan 24, 2024

I encountered the same problem, how can let it work?

@paulmillr paulmillr changed the title Folder not allowed to Rename a sub-folder or delete a non empty-sub-folder while the parent folder is being watched using Chokidar Folder not allowed to Rename Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants