diff --git a/mozilla/base/src/windows/nsFileSpecWin.cpp b/mozilla/base/src/windows/nsFileSpecWin.cpp index 1665849bc74..074252b974d 100644 --- a/mozilla/base/src/windows/nsFileSpecWin.cpp +++ b/mozilla/base/src/windows/nsFileSpecWin.cpp @@ -177,7 +177,7 @@ PRBool nsFileSpec::Exists() const //---------------------------------------------------------------------------------------- { struct stat st; - return 0 == stat(mPath, &st); + return 0 == stat(nsprPath(*this), &st); } // nsFileSpec::Exists //---------------------------------------------------------------------------------------- @@ -185,7 +185,7 @@ void nsFileSpec::GetModDate(TimeStamp& outStamp) const //---------------------------------------------------------------------------------------- { struct stat st; - if (stat(mPath, &st) == 0) + if (stat(nsprPath(*this), &st) == 0) outStamp = st.st_mtime; else outStamp = 0; @@ -196,7 +196,7 @@ PRUint32 nsFileSpec::GetFileSize() const //---------------------------------------------------------------------------------------- { struct stat st; - if (stat(mPath, &st) == 0) + if (stat(nsprPath(*this), &st) == 0) return (PRUint32)st.st_size; return 0; } // nsFileSpec::GetFileSize @@ -206,7 +206,7 @@ PRBool nsFileSpec::IsFile() const //---------------------------------------------------------------------------------------- { struct stat st; - return 0 == stat(mPath, &st) && (_S_IFREG & st.st_mode); + return 0 == stat(nsprPath(*this), &st) && (_S_IFREG & st.st_mode); } // nsFileSpec::IsFile //---------------------------------------------------------------------------------------- @@ -214,7 +214,7 @@ PRBool nsFileSpec::IsDirectory() const //---------------------------------------------------------------------------------------- { struct stat st; - return 0 == stat(mPath, &st) && (_S_IFDIR & st.st_mode); + return 0 == stat(nsprPath(*this), &st) && (_S_IFDIR & st.st_mode); } // nsFileSpec::IsDirectory //---------------------------------------------------------------------------------------- @@ -250,7 +250,7 @@ void nsFileSpec::CreateDirectory(int /*mode*/) //---------------------------------------------------------------------------------------- { // Note that mPath is canonical! - mkdir(mPath); + mkdir(nsprPath(*this)); } // nsFileSpec::CreateDirectory //---------------------------------------------------------------------------------------- @@ -267,11 +267,11 @@ void nsFileSpec::Delete(PRBool inRecursive) const child.Delete(inRecursive); } } - rmdir(mPath); + rmdir(nsprPath(*this)); } else { - remove(mPath); + remove(nsprPath(*this)); } } // nsFileSpec::Delete diff --git a/mozilla/xpcom/io/nsFileSpecWin.cpp b/mozilla/xpcom/io/nsFileSpecWin.cpp index 1665849bc74..074252b974d 100644 --- a/mozilla/xpcom/io/nsFileSpecWin.cpp +++ b/mozilla/xpcom/io/nsFileSpecWin.cpp @@ -177,7 +177,7 @@ PRBool nsFileSpec::Exists() const //---------------------------------------------------------------------------------------- { struct stat st; - return 0 == stat(mPath, &st); + return 0 == stat(nsprPath(*this), &st); } // nsFileSpec::Exists //---------------------------------------------------------------------------------------- @@ -185,7 +185,7 @@ void nsFileSpec::GetModDate(TimeStamp& outStamp) const //---------------------------------------------------------------------------------------- { struct stat st; - if (stat(mPath, &st) == 0) + if (stat(nsprPath(*this), &st) == 0) outStamp = st.st_mtime; else outStamp = 0; @@ -196,7 +196,7 @@ PRUint32 nsFileSpec::GetFileSize() const //---------------------------------------------------------------------------------------- { struct stat st; - if (stat(mPath, &st) == 0) + if (stat(nsprPath(*this), &st) == 0) return (PRUint32)st.st_size; return 0; } // nsFileSpec::GetFileSize @@ -206,7 +206,7 @@ PRBool nsFileSpec::IsFile() const //---------------------------------------------------------------------------------------- { struct stat st; - return 0 == stat(mPath, &st) && (_S_IFREG & st.st_mode); + return 0 == stat(nsprPath(*this), &st) && (_S_IFREG & st.st_mode); } // nsFileSpec::IsFile //---------------------------------------------------------------------------------------- @@ -214,7 +214,7 @@ PRBool nsFileSpec::IsDirectory() const //---------------------------------------------------------------------------------------- { struct stat st; - return 0 == stat(mPath, &st) && (_S_IFDIR & st.st_mode); + return 0 == stat(nsprPath(*this), &st) && (_S_IFDIR & st.st_mode); } // nsFileSpec::IsDirectory //---------------------------------------------------------------------------------------- @@ -250,7 +250,7 @@ void nsFileSpec::CreateDirectory(int /*mode*/) //---------------------------------------------------------------------------------------- { // Note that mPath is canonical! - mkdir(mPath); + mkdir(nsprPath(*this)); } // nsFileSpec::CreateDirectory //---------------------------------------------------------------------------------------- @@ -267,11 +267,11 @@ void nsFileSpec::Delete(PRBool inRecursive) const child.Delete(inRecursive); } } - rmdir(mPath); + rmdir(nsprPath(*this)); } else { - remove(mPath); + remove(nsprPath(*this)); } } // nsFileSpec::Delete