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

Directory not empty errors on watch -sd #389

Open
neverfox opened this issue Apr 18, 2014 · 5 comments
Open

Directory not empty errors on watch -sd #389

neverfox opened this issue Apr 18, 2014 · 5 comments

Comments

@neverfox
Copy link

When running mimosa watch -sd on Linux, I'm often to hit with ENOTEMPTY, directory not empty but eventually it will take if I run it enough times. Is this simply a limitation of the fs module dealing with OS quirks, or is this a possible problem with the recursion?

@neverfox neverfox changed the title ENOTEMPTY, directory not empty on watch -sd Directory not empty errors on watch -sd Apr 18, 2014
@Anachron
Copy link
Contributor

You could check this if it fixes your issue.

@dbashford
Copy link
Owner

That is likely unrelated.

It's one call that does the work.

wrench.rmdirSyncRecursive config.watch.compiledDir

Not sure why that would have trouble. Is that where you get a stack trace? Inside wrench?

@neverfox
Copy link
Author

Yes, here is the top of the strack trace:

fs.js:612
  return binding.rmdir(pathModule._makeLong(path));
                 ^
Error: ENOTEMPTY, directory not empty '/run/media/neverfox/Data/Linux/Repos/myproject/public/javascripts/vendor/firebase'
  at Object.fs.rmdirSync (fs.js:612:18)
  at Object.exports.rmdirSyncRecursive (/home/neverfox/.virtualenvs/myproject/lib/node_modules/mimosa/node_modules/wrench/lib/wrench.js:170:15)
  at Object.exports.rmdirSyncRecursive (/home/neverfox/.virtualenvs/myproject/lib/node_modules/mimosa/node_modules/wrench/lib/wrench.js:150:21)
  at Object.exports.rmdirSyncRecursive (/home/neverfox/.virtualenvs/myproject/lib/node_modules/mimosa/node_modules/wrench/lib/wrench.js:150:21)
  at Object.exports.rmdirSyncRecursive (/home/neverfox/.virtualenvs/myproject/lib/node_modules/mimosa/node_modules/wrench/lib/wrench.js:150:21)

It's a different file each time, but the trace is the same. I thought it might be related to the browser holding onto some files, but it happens even when I don't have the browser pointed at the server.

@dbashford
Copy link
Owner

Guess this might be related to this: ryanmcgrath/wrench-js#71

It is clearly something wrong with wrench. The entire job of rmdirSyncRecursive is to remove a directory and its contents, so an ENOTEMPTY should just not occur.

@neverfox
Copy link
Author

neverfox commented May 8, 2014

Interesting. I know I wasn't having this problem in the past. It seems that it's able to delete a little bit, then it hits a wall. Then when you run it again, a little more goes, etc.

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

3 participants