diff options
author | B. Stack <bgstack15@gmail.com> | 2023-04-03 09:56:38 -0400 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2023-04-03 09:56:38 -0400 |
commit | 765e1bb3bdeb5c49f08543c20206e55c772e6b80 (patch) | |
tree | 920f288910890016e540213fe65f2d6f38aa82be /zen/sys_info.cpp | |
parent | add upstream 12.1 (diff) | |
download | FreeFileSync-765e1bb3bdeb5c49f08543c20206e55c772e6b80.tar.gz FreeFileSync-765e1bb3bdeb5c49f08543c20206e55c772e6b80.tar.bz2 FreeFileSync-765e1bb3bdeb5c49f08543c20206e55c772e6b80.zip |
add upstream 12.212.2
Diffstat (limited to 'zen/sys_info.cpp')
-rw-r--r-- | zen/sys_info.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/zen/sys_info.cpp b/zen/sys_info.cpp index 55465711..2a32d247 100644 --- a/zen/sys_info.cpp +++ b/zen/sys_info.cpp @@ -131,8 +131,8 @@ ComputerModel zen::getComputerModel() //throw FileError cm.model = beforeFirst(cm.model, L'\u00ff', IfNotFoundReturn::all); //fix broken BIOS entries: cm.vendor = beforeFirst(cm.vendor, L'\u00ff', IfNotFoundReturn::all); //0xff can be considered 0 - trim(cm.model, false, true, [](wchar_t c) { return c == L'_'; }); //e.g. "CBX3___" or just "_" - trim(cm.vendor, false, true, [](wchar_t c) { return c == L'_'; }); //e.g. "DELL__" or just "_" + trim(cm.model, TrimSide::right, [](wchar_t c) { return c == L'_'; }); //e.g. "CBX3___" or just "_" + trim(cm.vendor, TrimSide::right, [](wchar_t c) { return c == L'_'; }); //e.g. "DELL__" or just "_" for (const char* dummyModel : { @@ -209,9 +209,13 @@ std::wstring zen::getOsDescription() //throw FileError Zstring zen::getRealProcessPath() //throw FileError { - return getSymlinkRawContent("/proc/self/exe").targetPath; //throw FileError - //path does not contain symlinks => no need for ::realpath() + try + { + return getSymlinkRawContent_impl("/proc/self/exe").targetPath; //throw SysError + //path does not contain symlinks => no need for ::realpath() + } + catch (const SysError& e) { throw FileError(_("Cannot get process information."), e.toString()); } } |