diff options
Diffstat (limited to 'libLumina/LuminaOS-Linux.cpp')
-rw-r--r-- | libLumina/LuminaOS-Linux.cpp | 11 |
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 |