* dir.cc (rmdir): Move existance check in front of
has_dot_last_component check. Simply setting errno in latter case.
This commit is contained in:
parent
e9095199cc
commit
03d5ce6d08
|
@ -1,3 +1,8 @@
|
||||||
|
2007-02-22 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* dir.cc (rmdir): Move existance check in front of
|
||||||
|
has_dot_last_component check. Simply setting errno in latter case.
|
||||||
|
|
||||||
2007-02-22 Corinna Vinschen <corinna@vinschen.de>
|
2007-02-22 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* fhandler.cc (fhandler_base::write): Remove wincap.has_lseek_bug case.
|
* fhandler.cc (fhandler_base::write): Remove wincap.has_lseek_bug case.
|
||||||
|
|
|
@ -307,10 +307,10 @@ rmdir (const char *dir)
|
||||||
debug_printf ("got %d error from build_fh_name", fh->error ());
|
debug_printf ("got %d error from build_fh_name", fh->error ());
|
||||||
set_errno (fh->error ());
|
set_errno (fh->error ());
|
||||||
}
|
}
|
||||||
else if (has_dot_last_component (dir, false))
|
|
||||||
set_errno (fh->exists () ? EINVAL : ENOENT);
|
|
||||||
else if (!fh->exists ())
|
else if (!fh->exists ())
|
||||||
set_errno (ENOENT);
|
set_errno (ENOENT);
|
||||||
|
else if (has_dot_last_component (dir, false))
|
||||||
|
set_errno (EINVAL);
|
||||||
else if (!fh->rmdir ())
|
else if (!fh->rmdir ())
|
||||||
res = 0;
|
res = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue