summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRye <rye@alchemyviewer.org>2025-12-29 07:29:11 -0500
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-01-07 02:15:43 +0200
commit615b1bcec74f4d6d759d69ecf9965b7d2b423c52 (patch)
treede4e619620f845d0063d924fb1f48ea2b7fe9308 /indra/newview
parente440c0e47958ae9adeb775de6a4f033010b82414 (diff)
Replace remaining boost::filesystem usage with std::filesystem
Signed-off-by: Rye <rye@alchemyviewer.org>
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappdelegate-objc.mm8
-rw-r--r--indra/newview/lllocalbitmaps.cpp18
-rw-r--r--indra/newview/lllocalbitmaps.h3
-rw-r--r--indra/newview/lllocalgltfmaterials.cpp18
-rw-r--r--indra/newview/lllocalgltfmaterials.h3
-rw-r--r--indra/newview/llsnapshotlivepreview.cpp1
-rw-r--r--indra/newview/llviewerwindow.cpp19
7 files changed, 20 insertions, 50 deletions
diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm
index 409671d939..23a4effd87 100644
--- a/indra/newview/llappdelegate-objc.mm
+++ b/indra/newview/llappdelegate-objc.mm
@@ -26,7 +26,7 @@
#import "llappdelegate-objc.h"
#if defined(LL_BUGSPLAT)
-#include <boost/filesystem.hpp>
+#include <filesystem>
#include <vector>
@import CrashReporter;
@import HockeySDK;
@@ -252,7 +252,7 @@
if(!secondLogPath.empty())
{
- boost::filesystem::remove(secondLogPath);
+ std::filesystem::remove(secondLogPath);
}
clearDumpLogsDir();
}
@@ -326,7 +326,7 @@ struct AttachmentInfo
{
AttachmentInfo(const std::string& path, const std::string& type):
pathname(path),
- basename(boost::filesystem::path(path).filename().string()),
+ basename(std::filesystem::path(path).filename().string()),
mimetype(type)
{}
@@ -361,7 +361,7 @@ struct AttachmentInfo
// the log data to a browser, so take this opportunity to rename the file
// from <base>.crash to <base>_log.txt
info[0].basename =
- boost::filesystem::path(info[0].pathname).stem().string() + "_log.txt";
+ std::filesystem::path(info[0].pathname).stem().string() + "_log.txt";
infos("attachmentsForBugsplatStartupManager attaching log " + info[0].basename);
NSMutableArray *attachments = [[NSMutableArray alloc] init];
diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp
index a5ab5538e7..d80d9058e2 100644
--- a/indra/newview/lllocalbitmaps.cpp
+++ b/indra/newview/lllocalbitmaps.cpp
@@ -31,8 +31,6 @@
/* own header */
#include "lllocalbitmaps.h"
-#include <boost/filesystem.hpp>
-
/* image compression headers. */
#include "llimagebmp.h"
#include "llimagetga.h"
@@ -40,11 +38,8 @@
#include "llimagejpeg.h"
#include "llimagepng.h"
-/* time headers */
-#include <time.h>
-#include <ctime>
-
/* misc headers */
+#include "fsyspath.h"
#include "llgltfmaterial.h"
#include "llscrolllistctrl.h"
#include "lllocaltextureobject.h"
@@ -190,15 +185,8 @@ bool LLLocalBitmap::updateSelf(EUpdateType optional_firstupdate)
if (gDirUtilp->fileExists(mFilename))
{
// verifying that the file has indeed been modified
-
-#ifndef LL_WINDOWS
- const std::time_t temp_time = boost::filesystem::last_write_time(boost::filesystem::path(mFilename));
-#else
- const std::time_t temp_time = boost::filesystem::last_write_time(boost::filesystem::path(ll_convert<std::wstring>(mFilename)));
-#endif
- LLSD new_last_modified = asctime(localtime(&temp_time));
-
- if (mLastModified.asString() != new_last_modified.asString())
+ const std::filesystem::file_time_type new_last_modified = std::filesystem::last_write_time(fsyspath(mFilename));
+ if (mLastModified != new_last_modified)
{
/* loading the image file and decoding it, here is a critical point which,
if fails, invalidates the whole update (or unit creation) process. */
diff --git a/indra/newview/lllocalbitmaps.h b/indra/newview/lllocalbitmaps.h
index 6c9d65e3b6..c4aaeae719 100644
--- a/indra/newview/lllocalbitmaps.h
+++ b/indra/newview/lllocalbitmaps.h
@@ -32,6 +32,7 @@
#include "lleventtimer.h"
#include "llpointer.h"
#include "llwearabletype.h"
+#include <filesystem>
class LLScrollListCtrl;
class LLImageRaw;
@@ -99,7 +100,7 @@ class LLLocalBitmap
LLUUID mTrackingID;
LLUUID mWorldID;
bool mValid;
- LLSD mLastModified;
+ std::filesystem::file_time_type mLastModified;
EExtension mExtension;
ELinkStatus mLinkStatus;
S32 mUpdateRetries;
diff --git a/indra/newview/lllocalgltfmaterials.cpp b/indra/newview/lllocalgltfmaterials.cpp
index aeae7cb56a..e9f2299be7 100644
--- a/indra/newview/lllocalgltfmaterials.cpp
+++ b/indra/newview/lllocalgltfmaterials.cpp
@@ -30,13 +30,8 @@
/* own header */
#include "lllocalgltfmaterials.h"
-#include <boost/filesystem.hpp>
-
-/* time headers */
-#include <time.h>
-#include <ctime>
-
/* misc headers */
+#include "fsyspath.h"
#include "llgltfmateriallist.h"
#include "llimage.h"
#include "llinventoryicon.h"
@@ -128,15 +123,8 @@ bool LLLocalGLTFMaterial::updateSelf()
if (gDirUtilp->fileExists(mFilename))
{
// verifying that the file has indeed been modified
-
-#ifndef LL_WINDOWS
- const std::time_t temp_time = boost::filesystem::last_write_time(boost::filesystem::path(mFilename));
-#else
- const std::time_t temp_time = boost::filesystem::last_write_time(boost::filesystem::path(ll_convert<std::wstring>(mFilename)));
-#endif
- LLSD new_last_modified = asctime(localtime(&temp_time));
-
- if (mLastModified.asString() != new_last_modified.asString())
+ const std::filesystem::file_time_type new_last_modified = std::filesystem::last_write_time(fsyspath(mFilename));
+ if (mLastModified != new_last_modified)
{
if (loadMaterial())
{
diff --git a/indra/newview/lllocalgltfmaterials.h b/indra/newview/lllocalgltfmaterials.h
index b806b54508..bf9a8c68ae 100644
--- a/indra/newview/lllocalgltfmaterials.h
+++ b/indra/newview/lllocalgltfmaterials.h
@@ -30,6 +30,7 @@
#include "lleventtimer.h"
#include "llpointer.h"
#include "llgltfmateriallist.h"
+#include <filesystem>
class LLScrollListCtrl;
class LLGLTFMaterial;
@@ -73,7 +74,7 @@ private: /* members */
std::string mShortName;
LLUUID mTrackingID;
LLUUID mWorldID;
- LLSD mLastModified;
+ std::filesystem::file_time_type mLastModified;
EExtension mExtension;
ELinkStatus mLinkStatus;
S32 mUpdateRetries;
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp
index 3a894996e4..7d2828a872 100644
--- a/indra/newview/llsnapshotlivepreview.cpp
+++ b/indra/newview/llsnapshotlivepreview.cpp
@@ -54,7 +54,6 @@
#include "llviewertexturelist.h"
#include "llwindow.h"
#include "llworld.h"
-#include <boost/filesystem.hpp>
constexpr F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f;
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 0980c4a291..c77dd9cc08 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -33,9 +33,6 @@
#include <iostream>
#include <fstream>
#include <algorithm>
-#include <boost/filesystem.hpp>
-#include <boost/lambda/core.hpp>
-#include <boost/regex.hpp>
#include "llagent.h"
#include "llagentcamera.h"
@@ -4837,14 +4834,10 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save
return;
}
-// Check if there is enough free space to save snapshot
-#ifdef LL_WINDOWS
- boost::filesystem::path b_path(ll_convert<std::wstring>(lastSnapshotDir));
-#else
- boost::filesystem::path b_path(lastSnapshotDir);
-#endif
- boost::system::error_code ec;
- if (!boost::filesystem::is_directory(b_path, ec) || ec.failed())
+ // Check if there is enough free space to save snapshot
+ std::filesystem::path b_path = fsyspath(lastSnapshotDir);
+ std::error_code ec;
+ if (!std::filesystem::is_directory(b_path, ec) || ec)
{
LLSD args;
args["PATH"] = lastSnapshotDir;
@@ -4853,8 +4846,8 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save
failure_cb();
return;
}
- boost::filesystem::space_info b_space = boost::filesystem::space(b_path, ec);
- if (ec.failed())
+ std::filesystem::space_info b_space = std::filesystem::space(b_path, ec);
+ if (ec)
{
LLSD args;
args["PATH"] = lastSnapshotDir;