summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-03-28 00:45:38 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-03-28 20:38:15 +0200
commit50a70fe2f831c6d34a6f518ae040e52ac2f9f924 (patch)
tree87fc571c38587336fd467a7161356d69701039d0 /indra/llcommon
parentf382180eb584d8e8690935a63bda3039fe8bccc9 (diff)
viewer#1073 crash at loadSkeleton
looks like file that was being parced got corrupted 'in progress'
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llsys.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index 938685bae6..352628f129 100644
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -1352,6 +1352,10 @@ BOOL gunzip_file(const std::string& srcfile, const std::string& dstfile)
} while(gzeof(src) == 0);
fclose(dst);
dst = NULL;
+#if LL_WINDOWS
+ // Rename in windows needs the dstfile to not exist.
+ LLFile::remove(dstfile, ENOENT);
+#endif
if (LLFile::rename(tmpfile, dstfile) == -1) goto err; /* Flawfinder: ignore */
retval = TRUE;
err: