summaryrefslogtreecommitdiff
path: root/zen
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-05-17 13:45:22 -0400
committerB Stack <bgstack15@gmail.com>2020-05-17 18:31:27 -0400
commit0eca2d3cf96a3092ac15dc818b777f859da03b08 (patch)
treeb9354ee5b46478ec9d69ce9c0088f78439a6a516 /zen
parentadd upstream 10.24 (diff)
downloadFreeFileSync-0eca2d3cf96a3092ac15dc818b777f859da03b08.tar.gz
FreeFileSync-0eca2d3cf96a3092ac15dc818b777f859da03b08.tar.bz2
FreeFileSync-0eca2d3cf96a3092ac15dc818b777f859da03b08.zip
include fixes after forum t=7276
https://freefilesync.org/forum/viewtopic.php?t=7276#p24407
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