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

Different behaviour when removing unowned files #11

Open
radare opened this issue Jan 19, 2016 · 2 comments
Open

Different behaviour when removing unowned files #11

radare opened this issue Jan 19, 2016 · 2 comments

Comments

@radare
Copy link
Contributor

radare commented Jan 19, 2016

this node module removes the foo/bar directory, but not the foo one. So the directory is not empty
The system rm will just not remove anything because the foo/bar file is not owned by the user. So maybe we want to add some extra parameters

mkdir -p foo/bar
chmod 000 foo/bar
sudo chown root foo/bar
rm -rf foo
find foo 2> /dev/null
echo ===================
node index.js > /dev/null
find foo

index.js contains:

const rmdir = require('rmdir');
rmdir ('foo', (err, dirs) => {
        if (err) console.error ('Cannot find dir');
        else console.log(dirs);
});
@radare
Copy link
Contributor Author

radare commented Jan 19, 2016

Also, the callback after removing the files passes the list of removed files/directories and it does contain foo/.. which it shouldnt

@ben-lin
Copy link
Member

ben-lin commented Jan 19, 2016

As mentioned in another issue I'm not able to fix this right now :(

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