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());
|
||||
#else
|
||||
int rc = ::rename(filename.c_str(),newname.c_str());
|
||||
if (rc == -1 && errno == EXDEV)
|
||||
{
|
||||
rc = std::system("mv '" + filename + "' '" + newname + '\'');
|
||||
}
|
||||
#endif
|
||||
return rc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user