diff --git a/base/src/unix/nsFileSpecUnix.cpp b/base/src/unix/nsFileSpecUnix.cpp index 5fbeeb981079..59160235db40 100644 --- a/base/src/unix/nsFileSpecUnix.cpp +++ b/base/src/unix/nsFileSpecUnix.cpp @@ -281,7 +281,8 @@ nsresult nsFileSpec::Move(const nsFileSpec& inNewParentDirectory) const result = NS_FILE_RESULT(CrudeFileCopy(*this, destPath)); if (result == NS_OK) { - Delete(PR_FALSE); + // cast to fix const-ness + ((nsFileSpec*)this)->Delete(PR_FALSE); } delete [] destPath; } diff --git a/xpcom/io/nsFileSpecUnix.cpp b/xpcom/io/nsFileSpecUnix.cpp index 5fbeeb981079..59160235db40 100644 --- a/xpcom/io/nsFileSpecUnix.cpp +++ b/xpcom/io/nsFileSpecUnix.cpp @@ -281,7 +281,8 @@ nsresult nsFileSpec::Move(const nsFileSpec& inNewParentDirectory) const result = NS_FILE_RESULT(CrudeFileCopy(*this, destPath)); if (result == NS_OK) { - Delete(PR_FALSE); + // cast to fix const-ness + ((nsFileSpec*)this)->Delete(PR_FALSE); } delete [] destPath; }