Fix for Linux file rename failures, thanks Taya and Router!

This commit is contained in:
Liru Færs
2020-01-12 13:23:02 -05:00
parent 64b43a47b5
commit 1726c27078

View File

@@ -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;
}