summaryrefslogtreecommitdiff
path: root/indra/llfilesystem/lldir.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-09-11 22:01:24 +0300
committerGitHub <noreply@github.com>2026-09-11 22:01:24 +0300
commitaf221b2e583f34fa4bf9d1d59e91fd9fcb5887b7 (patch)
treea892b4779a80ea52c640ccfb237eddcccb056ed8 /indra/llfilesystem/lldir.cpp
parent20f4a772919afad60739a61a441c9e84251e31c0 (diff)
parent01f554d1a0a461f1ad3d7321566a04e7987038df (diff)
Merge from 26.4 into develop
Diffstat (limited to 'indra/llfilesystem/lldir.cpp')
-rw-r--r--indra/llfilesystem/lldir.cpp24
1 files changed, 19 insertions, 5 deletions
diff --git a/indra/llfilesystem/lldir.cpp b/indra/llfilesystem/lldir.cpp
index 4038e7bf12..cfbf4361d1 100644
--- a/indra/llfilesystem/lldir.cpp
+++ b/indra/llfilesystem/lldir.cpp
@@ -98,15 +98,29 @@ std::vector<std::string> LLDir::getFilesInDir(const std::string &dirname)
if (std::filesystem::is_directory(dir_path, ec))
{
std::filesystem::directory_iterator end_iter;
- for (std::filesystem::directory_iterator dir_itr(dir_path);
- dir_itr != end_iter;
- ++dir_itr)
+ try
{
- if (std::filesystem::is_regular_file(dir_itr->status()))
+ for (std::filesystem::directory_iterator dir_itr(dir_path);
+ dir_itr != end_iter;
+ ++dir_itr)
{
- v.push_back(dir_itr->path().filename().string());
+ try
+ {
+ if (std::filesystem::is_regular_file(dir_itr->status()))
+ {
+ v.push_back(fsyspath(dir_itr->path().filename()).string());
+ }
+ }
+ catch (const std::system_error& e)
+ {
+ LL_WARNS() << "Exception accessing directory entry: " << e.what() << LL_ENDL;
+ }
}
}
+ catch (const std::system_error& e)
+ {
+ LL_WARNS() << "Exception iterating directory: " << e.what() << LL_ENDL;
+ }
}
return v;
}