Fix for Linux file rename failures, thanks Taya and Router!
This commit is contained in:
@@ -281,6 +281,10 @@ int LLFile::rename_nowarn(const std::string& filename, const std::string& newnam
|
|||||||
int rc = _wrename(utf16filename.c_str(),utf16newname.c_str());
|
int rc = _wrename(utf16filename.c_str(),utf16newname.c_str());
|
||||||
#else
|
#else
|
||||||
int rc = ::rename(filename.c_str(),newname.c_str());
|
int rc = ::rename(filename.c_str(),newname.c_str());
|
||||||
|
if (rc == -1 && errno == EXDEV)
|
||||||
|
{
|
||||||
|
rc = std::system("mv '" + filename + "' '" + newname + '\'');
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user