Projeto-Pindorama / heirloom-ng

A collection of standard Unix utilities that is intended to provide maximum compatibility with traditional Unix while incorporating additional features necessary today.
http://heirloom-ng.pindorama.dob.jp
Other
24 stars 7 forks source link

fix: update the default rm(1) to conform to the new POSIX 1003.1(2008) standard #18

Closed trqt closed 1 year ago

trqt commented 1 year ago

Fix #17

arthurbacci commented 1 year ago

Shouldn't it return 0 in case of rm -f . too?

trqt commented 1 year ago

Shouldn't it return 0 in case of rm -f . too?

No, '.' is a valid directory

takusuman commented 1 year ago

Shouldn't it return 0 in case of rm -f . too?

No. As Torquato said, "." is a directory, and rm won't act (rmdir() and unlink()) in directories without -r.