From 58cc446a340fc9361b08372bad9c1ce9eaeaa19c Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 26 Mar 2015 15:40:44 -0400 Subject: Clean up the new filesystemusage functions a bit. Make sure that the directory is quoted within the command (could be spaces in the path). --- libLumina/LuminaOS-FreeBSD.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libLumina/LuminaOS-FreeBSD.cpp') diff --git a/libLumina/LuminaOS-FreeBSD.cpp b/libLumina/LuminaOS-FreeBSD.cpp index dfc413b4..fc4135f0 100644 --- a/libLumina/LuminaOS-FreeBSD.cpp +++ b/libLumina/LuminaOS-FreeBSD.cpp @@ -198,10 +198,11 @@ QStringList LOS::Checksums(QStringList filepaths){ //Return: checksum of the inp //file system capacity QString LOS::FileSystemCapacity(QString dir) { //Return: percentage capacity as give by the df command - QStringList mountInfo = LUtils::getCmdOutput("df " + dir); + QStringList mountInfo = LUtils::getCmdOutput("df \"" + dir+"\""); QString::SectionFlag skipEmpty = QString::SectionSkipEmpty; //we take the 5th word on the 2 line QString capacity = mountInfo[1].section(" ",4,4, skipEmpty); return capacity; +} #endif -- cgit