diff --git a/xpcom/obsolete/nsFileSpecUnix.cpp b/xpcom/obsolete/nsFileSpecUnix.cpp index cbc211c0af59..9d7c2984f234 100644 --- a/xpcom/obsolete/nsFileSpecUnix.cpp +++ b/xpcom/obsolete/nsFileSpecUnix.cpp @@ -158,8 +158,7 @@ char* nsFileSpec::GetLeafName() const PRBool nsFileSpec::Exists() const //---------------------------------------------------------------------------------------- { - struct stat st; - return !mPath.IsEmpty() && 0 == stat(mPath, &st); + return !mPath.IsEmpty() && 0 == access(mPath, F_OK); } // nsFileSpec::Exists //----------------------------------------------------------------------------------------