Rob Landley
|
551f355d24
Minor tweak.
|
3 years ago |
Yi-Yo Chiang
|
a8d8fbfa65
rm: Check file existence with lstat() explicitly if "-f" is specified
|
3 years ago |
Rob Landley
|
70ab2dfb92
David Legault complained that dir/.* tells rm to delete dir/.. and we'd do it.
|
4 years ago |
Denys Nykula
|
ae34569fd0
Don't rm prompt for nonexistent, just warn.
|
4 years ago |
Elliott Hughes
|
1c0d965200
rm.c: use FLAG().
|
4 years ago |
Elliott Hughes
|
ee8eca90ec
rm: error message consistency.
|
4 years ago |
makepost@firemail.cc
|
e954e37fbf
Add rm -v.
|
5 years ago |
Elliott Hughes
|
141a075c0e
Clean up some --help formatting.
|
5 years ago |
Rob Landley
|
382057f588
Have dirtree_notdotdot() pass through !node->parent so . and .. on the command
|
7 years ago |
Rob Landley
|
d3a435e53c
Add error_msg_raw() and friends, replace error_msg("%s", s) uses, enable format
|
8 years ago |
Rob Landley
|
b1353fb918
Remove prompt argument from yesno(), caller can fprintf(stderr, "blah") itself.
|
8 years ago |
Rob Landley
|
459cab00f2
In rm, init using to AT_REMOVEDIR in the dir case earlier.
|
9 years ago |
Rob Landley
|
bd6c3f35ae
Alright, the Android guys agree with the musl guys: faccessat(AT_SYMLINK_NOFOLLOW) is not supported.
|
9 years ago |
Isaac Dunham
|
7e96783ee7
rm -rf needs to chmod directories to u+rwx, because directories need +x to search.
|
9 years ago |
Rob Landley
|
e1366f02fe
Bug report from luckboy: rm -f on a broken symlink didn't work because our "does it exist" test (to avoid errors on rm -f of nonexistent files) said it didn't.
|
9 years ago |
Rob Landley
|
fec3fd1f8a
Move DIRTREE_COMEAGAIN second callback up to when the filehandle is still open, and add dir->again variable to distinguish second call instead of checking for -1 filehandle.
|
10 years ago |
Rob Landley
|
5ce682e4f4
Fix rm -rf of chmod 000 directories.
|
10 years ago |
Rob Landley
|
b6dd79b93d
Missing typecast in recent rm fix. Oops.
|
10 years ago |
Rob Landley
|
829497311b
fix rm to handle "mkdir sub/sub && chmod 007 sub/sub && rm -rf sub".
|
10 years ago |
Rob Landley
|
662a267c9b
Have error_msg() and friends set TT.exitval to 1 if it's still 0, clean out other places that were setting it that no longer need to.
|
11 years ago |
Rob Landley
|
5806b9ff16
The Linux kernel "make clean" calls rm -f with no arguments, which apparently is not an error.
|
11 years ago |
Rob Landley
|
b9bde7b403
essat's flag not to follow symlinks isn't in the system call, and if libc is supposed to implement this as a wrapper uClibc gets it wrong. So use the stat info about symlinks instead. (Doesn't check the parent directory, but if that's read only we can't delete the file anyway so prompting is moot.)
|
11 years ago |
Rob Landley
|
37de8ed2aa
Complicate the rm -i behavior to do what posix specifies.
|
11 years ago |
Rob Landley
|
c087a4a911
New rm command.
|
11 years ago |