summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-04-16 01:02:40 +0200
committerraveit65 <[email protected]>2019-04-16 14:36:53 +0200
commite59ca718f11094b8ba2123febe017a5b43244bb0 (patch)
treebe013ee8ffc521d5cd033d99b7cd77d33f5ba273 /src
parent210f1efb1ec52b9f371a01b8f6ae4ce2aa219472 (diff)
downloadmate-system-monitor-e59ca718f11094b8ba2123febe017a5b43244bb0.tar.bz2
mate-system-monitor-e59ca718f11094b8ba2123febe017a5b43244bb0.tar.xz
sysinfo: show debian version
Diffstat (limited to 'src')
-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);
+ }
}
}
};