summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2025-08-08 18:32:24 -0400
committerGitHub <noreply@github.com>2025-08-08 18:32:24 -0400
commit28678996ceaea019aafaa26911a440769320c498 (patch)
tree1c5461d5b432b2b6114faee0ebfb1bb2d2f5095a /indra/newview/llviewerwindow.cpp
parenta6feb3dc7f3b1985bcc6a16330b368917cff25f8 (diff)
parentf338b91f7c9dbfe999b5ea9a1facb9eaeafb3407 (diff)
Merge pull request #4382 from secondlife/release/2025.05
Release/2025.05
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index e8a285f494..6aade15d23 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -4780,7 +4780,18 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save
#else
boost::filesystem::path b_path(lastSnapshotDir);
#endif
- if (!boost::filesystem::is_directory(b_path))
+ boost::system::error_code ec;
+ if (!boost::filesystem::is_directory(b_path, ec) || ec.failed())
+ {
+ LLSD args;
+ args["PATH"] = lastSnapshotDir;
+ LLNotificationsUtil::add("SnapshotToLocalDirNotExist", args);
+ resetSnapshotLoc();
+ failure_cb();
+ return;
+ }
+ boost::filesystem::space_info b_space = boost::filesystem::space(b_path, ec);
+ if (ec.failed())
{
LLSD args;
args["PATH"] = lastSnapshotDir;
@@ -4789,7 +4800,6 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save
failure_cb();
return;
}
- boost::filesystem::space_info b_space = boost::filesystem::space(b_path);
if (b_space.free < image->getDataSize())
{
LLSD args;
@@ -4806,6 +4816,8 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save
LLNotificationsUtil::add("SnapshotToComputerFailed", args);
failure_cb();
+
+ // Shouldn't there be a return here?
}
// Look for an unused file name