From 1726c27078721502e8d27c21b0b6d823a3083cdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sun, 12 Jan 2020 13:23:02 -0500 Subject: [PATCH] Fix for Linux file rename failures, thanks Taya and Router! --- indra/llcommon/llfile.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp index becf99092..b0e7c963a 100644 --- a/indra/llcommon/llfile.cpp +++ b/indra/llcommon/llfile.cpp @@ -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; }