summaryrefslogtreecommitdiff
path: root/zen
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-05-18 16:56:31 +0000
committerB Stack <bgstack15@gmail.com>2020-05-18 16:56:31 +0000
commit7f66fcd2fa00cb1de36640cef725acfdfb75f868 (patch)
treeb9354ee5b46478ec9d69ce9c0088f78439a6a516 /zen
parentMerge branch '10.24' into 'master' (diff)
parentinclude fixes after forum t=7276 (diff)
downloadFreeFileSync-7f66fcd2fa00cb1de36640cef725acfdfb75f868.tar.gz
FreeFileSync-7f66fcd2fa00cb1de36640cef725acfdfb75f868.tar.bz2
FreeFileSync-7f66fcd2fa00cb1de36640cef725acfdfb75f868.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.cpp8
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()); }
bgstack15