Fixed: Unable to patch when Ryzom was located on a mounted FS
This commit is contained in:
parent
72a50960cb
commit
df3cdfab70
2 changed files with 6 additions and 6 deletions
|
@ -1068,12 +1068,12 @@ float CPatchManager::getCurrentFileProgress() const
|
|||
}
|
||||
|
||||
// ****************************************************************************
|
||||
void CPatchManager::setRWAccess (const string &filename)
|
||||
void CPatchManager::setRWAccess (const string &filename, bool bThrowException)
|
||||
{
|
||||
ucstring s = CI18N::get("uiSetAttrib") + " " + filename;
|
||||
setState(true, s);
|
||||
|
||||
if (!NLMISC::CFile::setRWAccess(filename))
|
||||
if (!NLMISC::CFile::setRWAccess(filename) && bThrowException)
|
||||
{
|
||||
s = CI18N::get("uiAttribErr") + " " + filename + " (" + toString(errno) + "," + strerror(errno) + ")";
|
||||
setState(true, s);
|
||||
|
@ -1351,7 +1351,7 @@ void CPatchManager::downloadFileWithCurl (const string &source, const string &de
|
|||
// create the local file
|
||||
if (NLMISC::CFile::fileExists(dest))
|
||||
{
|
||||
setRWAccess(dest);
|
||||
setRWAccess(dest, false);
|
||||
NLMISC::CFile::deleteFile(dest.c_str());
|
||||
}
|
||||
FILE *fp = fopen (dest.c_str(), "wb");
|
||||
|
@ -1492,7 +1492,7 @@ void CPatchManager::decompressFile (const string &filename)
|
|||
}
|
||||
|
||||
string dest = filename.substr(0, filename.size ()-4);
|
||||
setRWAccess(dest);
|
||||
setRWAccess(dest, false);
|
||||
//if(isVerboseLog()) nlinfo("Calling fopen('%s','wb')", dest.c_str());
|
||||
FILE *fp = fopen (dest.c_str(), "wb");
|
||||
if (fp == NULL)
|
||||
|
@ -1566,7 +1566,7 @@ void CPatchManager::applyDate (const string &sFilename, uint32 nDate)
|
|||
{
|
||||
// _utimbuf utb;
|
||||
// utb.actime = utb.modtime = nDate;
|
||||
setRWAccess(sFilename);
|
||||
setRWAccess(sFilename, false);
|
||||
ucstring s = CI18N::get("uiChangeDate") + " " + NLMISC::CFile::getFilename(sFilename) + " " + toString(NLMISC::CFile::getFileModificationDate (sFilename)) +
|
||||
" -> " + toString(nDate);
|
||||
setState(true,s);
|
||||
|
|
|
@ -302,7 +302,7 @@ private:
|
|||
/// Read the description of the highest client version file found
|
||||
void readClientVersionAndDescFile();
|
||||
|
||||
void setRWAccess (const std::string &filename);
|
||||
void setRWAccess (const std::string &filename, bool bThrowException=true);
|
||||
|
||||
std::string deleteFile (const std::string &filename, bool bThrowException=true, bool bWarning=true);
|
||||
|
||||
|
|
Loading…
Reference in a new issue