Woops, gotta do a char array for that, also set errno to 0

This commit is contained in:
Liru Færs
2020-01-13 12:05:00 -05:00
parent 2ace698101
commit 623a484ae3

View File

@@ -283,7 +283,8 @@ int LLFile::rename_nowarn(const std::string& filename, const std::string& newnam
int rc = ::rename(filename.c_str(),newname.c_str());
if (rc == -1 && errno == EXDEV)
{
rc = std::system("mv '" + filename + "' '" + newname + '\'');
rc = std::system(("mv '" + filename + "' '" + newname + '\'').data());
errno = 0;
}
#endif
return rc;