Skip to content

rm -rf incorrect behaviour #332

@stefk

Description

@stefk

rm('-rf', target) should never throw an exception when the target doesn't exist. It does, however, when it is inside a non-existent directory:

Expected:

mkdir('./tmp');
rm('-rf', './tmp');
rm('-rf', './tmp'); // no error
rm('-rf', './tmp/*'); // no error
rm('-rf', './tmp/non/existent'); // no error

Actual:

mkdir('./tmp');
rm('-rf', './tmp');
rm('-rf', './tmp'); // ok
rm('-rf', './tmp/*'); // rm: no such file or directory: ./tmp
rm('-rf', './tmp/non/existent'); // same

Metadata

Metadata

Assignees

Labels

fixBug/defect, or a fix for such a problemtest

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions