diff options
author | B Stack <bgstack15@gmail.com> | 2020-05-18 16:56:31 +0000 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2020-05-18 16:56:31 +0000 |
commit | 7f66fcd2fa00cb1de36640cef725acfdfb75f868 (patch) | |
tree | b9354ee5b46478ec9d69ce9c0088f78439a6a516 /zen | |
parent | Merge branch '10.24' into 'master' (diff) | |
parent | include fixes after forum t=7276 (diff) | |
download | FreeFileSync-10.24.tar.gz FreeFileSync-10.24.tar.bz2 FreeFileSync-10.24.zip |
Merge branch '10.24' into 'master'10.24
include fixes after forum t=7276
See merge request opensource-tracking/FreeFileSync!22
Diffstat (limited to 'zen')
-rw-r--r-- | zen/system.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/zen/system.cpp b/zen/system.cpp index aa967f71..f39fae84 100644 --- a/zen/system.cpp +++ b/zen/system.cpp @@ -116,11 +116,11 @@ std::wstring zen::getOsDescription() //throw FileError trim(osName, true, true, [](char c) { return c == '"' || c == '\''; }); trim(osVersion, true, true, [](char c) { return c == '"' || c == '\''; }); - if (osName .empty()) throw SysError(formatSystemError("/etc/os-release", L"", L"NAME missing.")); - if (osVersion.empty()) throw SysError(formatSystemError("/etc/os-release", L"", L"VERSION_ID missing.")); - + if (osName.empty()) throw SysError(formatSystemError("/etc/os-release", L"", L"NAME missing.")); + //VERSION_ID usually available, except for Arch Linux: https://freefilesync.org/forum/viewtopic.php?t=7276 //PRETTY_NAME? too wordy! e.g. "Fedora 17 (Beefy Miracle)" - return utfTo<std::wstring>(osName + ' ' + osVersion); //e.g. "CentOS Linux 7" + + return utfTo<std::wstring>(trimCpy(osName + ' ' + osVersion)); //e.g. "CentOS Linux 7" } catch (const SysError& e) { throw FileError(_("Cannot get process information."), e.toString()); } |