diff options
author | Michael Neumann <mneumann@ntecs.de> | 2015-08-16 16:40:09 +0200 |
---|---|---|
committer | Michael Neumann <mneumann@ntecs.de> | 2015-08-16 16:40:09 +0200 |
commit | ade698681bb7d095960f459ba08420bb7a383966 (patch) | |
tree | f2c8fe7a500b1cb145e749beea89e8631d17425c | |
parent | Implement Battery hooks for DragonFly (diff) | |
download | lumina-ade698681bb7d095960f459ba08420bb7a383966.tar.gz lumina-ade698681bb7d095960f459ba08420bb7a383966.tar.bz2 lumina-ade698681bb7d095960f459ba08420bb7a383966.zip |
DragonFly: Sync LOS::Checksums() with FreeBSD
-rw-r--r-- | libLumina/LuminaOS-DragonFly.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libLumina/LuminaOS-DragonFly.cpp b/libLumina/LuminaOS-DragonFly.cpp index 73815ea0..0dd10b88 100644 --- a/libLumina/LuminaOS-DragonFly.cpp +++ b/libLumina/LuminaOS-DragonFly.cpp @@ -215,7 +215,15 @@ 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("md5 \""+filepaths.join("\" \"")+"\""); + for(int i=0; i<info.length(); i++){ + if( !info[i].contains(" = ") ){ info.removeAt(i); i--; } + else{ + //Strip out the extra information + info[i] = info[i].section(" = ",1,1); + } + } + return info; } //file system capacity |