mirror of
https://github.com/ksherlock/mpw.git
synced 2025-01-18 12:30:29 +00:00
unlink/rmdir don't follow symbolic links, so use lstat instead of stat.
This commit is contained in:
parent
172da3e250
commit
3615fbe941
@ -639,7 +639,7 @@ namespace OS
|
|||||||
|
|
||||||
int ok;
|
int ok;
|
||||||
|
|
||||||
ok = ::stat(sname.c_str(), &st);
|
ok = ::lstat(sname.c_str(), &st);
|
||||||
if (ok == 0)
|
if (ok == 0)
|
||||||
{
|
{
|
||||||
if (S_ISDIR(st.st_mode))
|
if (S_ISDIR(st.st_mode))
|
||||||
|
@ -345,7 +345,7 @@ namespace OS {
|
|||||||
Log(" FSpDelete(%s)\n", sname.c_str());
|
Log(" FSpDelete(%s)\n", sname.c_str());
|
||||||
|
|
||||||
|
|
||||||
if (::stat(sname.c_str(), &st) < 0)
|
if (::lstat(sname.c_str(), &st) < 0)
|
||||||
return macos_error_from_errno();
|
return macos_error_from_errno();
|
||||||
|
|
||||||
int ok = 0;
|
int ok = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user