Browse files

Fix an issue where devices with a single child were still (incorrectl…

…y) listing the parent device as well.
  • Loading branch information...
1 parent e36bf91 commit f7d313ce543d7009954e51a740bd086ee6c50b4b @beanpole135 beanpole135 committed Aug 27, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 src-qt4/pc-mounttray/devCheck.cpp
View
6 src-qt4/pc-mounttray/devCheck.cpp
@@ -101,6 +101,10 @@ bool DevCheck::devInfo(QString dev, QString* type, QString* label, QString* file
break;
}
}
+ if(detType == "USB"){
+ //make sure that it is not a SCSI device
+
+ }
//Make sure we quit before running commands on any invalid device nodes
if(detType.isEmpty() || !QFile::exists(fullDev) ){return FALSE;}
@@ -121,7 +125,7 @@ bool DevCheck::devInfo(QString dev, QString* type, QString* label, QString* file
QStringList tmp = output.split(",");
if( !tmp.filter("partition ").isEmpty() ){
//Check for actual sub-devices (*s[#][a/b/c/....])
- if( devChildren(node).length() > 1 ){ hasPartitions = TRUE; } //the main device will always make it length 1
+ if( devChildren(node).length() > 0 ){ hasPartitions = TRUE; } //the main device will always make it length 1
}
if( !tmp.filter("last mounted on /").isEmpty() && (detType == "SATA")){
isMounted = TRUE;

0 comments on commit f7d313c

Please sign in to comment.