diff options
Diffstat (limited to 'indra/llfilesystem/lldir.cpp')
| -rw-r--r-- | indra/llfilesystem/lldir.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/indra/llfilesystem/lldir.cpp b/indra/llfilesystem/lldir.cpp index 46a94277c5..543760da47 100644 --- a/indra/llfilesystem/lldir.cpp +++ b/indra/llfilesystem/lldir.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2002&license=viewerlgpl$ * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * Copyright (C) 2026, Linden Research, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -1159,6 +1159,24 @@ void LLDir::openDir(const std::string& filepath) LL_INFOS() << "Opened file browser for: " << filepath << LL_ENDL; } } +#if LL_VELOPACK +const char* const LLDir::PORTABLE_USER_DATA_DIRNAME = "UserData"; + +// static +bool LLDir::isPortableInstall(const std::string& install_root) +{ + // Todo: portable mac builds don't have a .portable marker file. + // Fix mac portable builds to include one. + if (install_root.empty()) + { + return false; + } + fsyspath marker(install_root); + marker /= ".portable"; + std::error_code ec; + return std::filesystem::is_regular_file(marker, ec); +} +#endif // LL_VELOPACK void dir_exists_or_crash(const std::string &dir_name) { |
