mirror of
https://github.com/ksherlock/mpw.git
synced 2025-01-17 21:30:00 +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;
|
||||
|
||||
ok = ::stat(sname.c_str(), &st);
|
||||
ok = ::lstat(sname.c_str(), &st);
|
||||
if (ok == 0)
|
||||
{
|
||||
if (S_ISDIR(st.st_mode))
|
||||
|
@ -345,7 +345,7 @@ namespace OS {
|
||||
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();
|
||||
|
||||
int ok = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user