aboutsummaryrefslogtreecommitdiff
path: root/libLumina/LuminaOS-Linux.cpp
diff options
context:
space:
mode:
authorChristopher Roy Bratusek <nano@jpberlin.de>2015-03-26 21:30:24 +0100
committerChristopher Roy Bratusek <nano@jpberlin.de>2015-03-26 21:30:24 +0100
commit3eb696e135f213359ae7439d1d2565d0a7c437cc (patch)
treea851e9d1fccaa8a5ae3061fa58238b5f4df068b7 /libLumina/LuminaOS-Linux.cpp
parentMerge pull request #77 from william-os4y/fmNumbers (diff)
downloadlumina-3eb696e135f213359ae7439d1d2565d0a7c437cc.tar.gz
lumina-3eb696e135f213359ae7439d1d2565d0a7c437cc.tar.bz2
lumina-3eb696e135f213359ae7439d1d2565d0a7c437cc.zip
- updated debian/changelog
- checksums for LuminaOS-Debian and LuminaOS-Linux - capacity for LuminaOS-Debian
Diffstat (limited to 'libLumina/LuminaOS-Linux.cpp')
-rw-r--r--libLumina/LuminaOS-Linux.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/libLumina/LuminaOS-Linux.cpp b/libLumina/LuminaOS-Linux.cpp
index ecf0adeb..9b4048d1 100644
--- a/libLumina/LuminaOS-Linux.cpp
+++ b/libLumina/LuminaOS-Linux.cpp
@@ -192,7 +192,16 @@ int LOS::batterySecondsLeft(){ //Returns: estimated number of seconds remaining
//File Checksums
QStringList LOS::Checksums(QStringList filepaths){ //Return: checksum of the input file
- return QStringList();
+ QStringList info = LUtils::getCmdOutput("md5sum \""+filepaths.join("\" \"")+"\"");
+ for(int i=0; i<info.length(); i++){
+ // first: md5sum: = error ; second: there's always one empty entry generated by getCmdOutput
+ if( info[i].startsWith("md5sum:") || info[i].isEmpty()){ info.removeAt(i); i--; }
+ else{
+ //Strip out the extra information
+ info[i] = info[i].section(" ",0,0);
+ }
+ }
+ return info;
}
//file system capacity
bgstack15