From 12d8804b0b093455edee8bdcc8888ab2bf404717 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 2 Mar 2021 23:15:04 -0500
Subject: [PATCH] Fix annoying warning spam when renaming an LLFileSystem file
 when new file does not actually exist

---
 indra/llfilesystem/llfilesystem.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/indra/llfilesystem/llfilesystem.cpp b/indra/llfilesystem/llfilesystem.cpp
index 71449216b9c..83b5d36f0e2 100644
--- a/indra/llfilesystem/llfilesystem.cpp
+++ b/indra/llfilesystem/llfilesystem.cpp
@@ -64,7 +64,7 @@ bool LLFileSystem::removeFile(const LLUUID& file_id, const LLAssetType::EType fi
 {
     const std::string filename =  LLDiskCache::getInstance()->metaDataToFilepath(file_id, file_type);
 
-    LLFile::remove(filename.c_str());
+    LLFile::remove(filename, ENOENT);
 
     return true;
 }
@@ -77,7 +77,7 @@ bool LLFileSystem::renameFile(const LLUUID& old_file_id, const LLAssetType::ETyp
     const std::string new_filename =  LLDiskCache::getInstance()->metaDataToFilepath(new_file_id, new_file_type);
 
     // Rename needs the new file to not exist.
-    LLFileSystem::removeFile(new_file_id, new_file_type);
+    LLFile::remove(new_filename, ENOENT);
 
     if (LLFile::rename(old_filename, new_filename) != 0)
     {
-- 
GitLab