mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 07:17:35 +00:00
rm: When invoked on a symlink, remove the symlink itself
This commit is contained in:
parent
8f20b173fd
commit
f026f0f4bb
1 changed files with 2 additions and 3 deletions
|
@ -12,9 +12,8 @@
|
|||
int remove(bool recursive, const char* path)
|
||||
{
|
||||
struct stat path_stat;
|
||||
int s = stat(path, &path_stat);
|
||||
if (s < 0) {
|
||||
perror("stat");
|
||||
if (lstat(path, &path_stat) < 0) {
|
||||
perror("lstat");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue