From 0eca2d3cf96a3092ac15dc818b777f859da03b08 Mon Sep 17 00:00:00 2001 From: B Stack Date: Sun, 17 May 2020 13:45:22 -0400 Subject: include fixes after forum t=7276 https://freefilesync.org/forum/viewtopic.php?t=7276#p24407 --- zen/system.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'zen') 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(osName + ' ' + osVersion); //e.g. "CentOS Linux 7" + + return utfTo(trimCpy(osName + ' ' + osVersion)); //e.g. "CentOS Linux 7" } catch (const SysError& e) { throw FileError(_("Cannot get process information."), e.toString()); } -- cgit