diff options
author | Ken Moore <ken@pcbsd.org> | 2015-03-13 18:08:27 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-03-13 18:08:27 -0400 |
commit | 275db04388b03b9e089b5a0cc66a3ab63bd369c1 (patch) | |
tree | 0b265daf60283dac5c1734ab9f700a2245017985 | |
parent | Make sure the file removals are multi-selection aware in lumina-fm. (diff) | |
parent | Merge pull request #67 from william-os4y/checksum (diff) | |
download | lumina-275db04388b03b9e089b5a0cc66a3ab63bd369c1.tar.gz lumina-275db04388b03b9e089b5a0cc66a3ab63bd369c1.tar.bz2 lumina-275db04388b03b9e089b5a0cc66a3ab63bd369c1.zip |
Merge branch 'master' of https://github.com/pcbsd/lumina
-rw-r--r-- | libLumina/LuminaOS-OpenBSD.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/libLumina/LuminaOS-OpenBSD.cpp b/libLumina/LuminaOS-OpenBSD.cpp index 7cf6c571..b6996795 100644 --- a/libLumina/LuminaOS-OpenBSD.cpp +++ b/libLumina/LuminaOS-OpenBSD.cpp @@ -192,6 +192,19 @@ int LOS::batterySecondsLeft(){ //Returns: estimated number of seconds remaining //File Checksums QStringList LOS::Checksums(QStringList filepaths){ //Return: checksum of the input file - return QStringList(); + //on OpenBSD md5 has the following layout + //>md5 LuminaThemes.o LuminaUtils.o + //MD5 (LuminaThemes.o) = 50006505d9d7e54e5154eeb095555055 + //MD5 (LuminaUtils.o) = d490878ee8866e55e5af571b98b4d448 + + 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; } #endif |