-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
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);
});
Metadata
Metadata
Assignees
Labels
No labels