summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-04-16 01:02:40 +0200
committerPablo Barciela <[email protected]>2019-04-17 02:16:16 +0200
commit1180d34511c9aee1e4b0a470da57a8433f2800c0 (patch)
treeeb91403ef955c15ca769991d4088e7ae9021ffcd
parent4a1ac5cc8103a51bcbd18623b9285a80eb2b48d7 (diff)
downloadmate-system-monitor-1180d34511c9aee1e4b0a470da57a8433f2800c0.tar.bz2
mate-system-monitor-1180d34511c9aee1e4b0a470da57a8433f2800c0.tar.xz
sysinfo: show debian version
-rw-r--r--src/sysinfo.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sysinfo.cpp b/src/sysinfo.cpp
index 0290e9b..4ef988e 100644
--- a/src/sysinfo.cpp
+++ b/src/sysinfo.cpp
@@ -612,6 +612,14 @@ namespace {
this->distro_release = s.substr(start + 1, s.size() - start - 2);
}
}
+ input.close();
+ input.clear();
+ }
+ if (this->distro_release.empty()) {
+ input.open("/etc/debian_version");
+ if (input) {
+ getline(input, this->distro_release);
+ }
}
}
};