[PC-BSD Commits] r17922 - pcbsd/current/src-qt4/libpcbsd

svn at pcbsd.org svn at pcbsd.org
Tue Jul 24 12:14:26 PDT 2012


Author: kris
Date: 2012-07-24 19:14:26 +0000 (Tue, 24 Jul 2012)
New Revision: 17922

Modified:
   pcbsd/current/src-qt4/libpcbsd/utils.cpp
Log:

Fix a bug in getting conf file values



Modified: pcbsd/current/src-qt4/libpcbsd/utils.cpp
===================================================================
--- pcbsd/current/src-qt4/libpcbsd/utils.cpp	2012-07-24 19:04:43 UTC (rev 17921)
+++ pcbsd/current/src-qt4/libpcbsd/utils.cpp	2012-07-24 19:14:26 UTC (rev 17922)
@@ -374,7 +374,7 @@
 
 QString Utils::getConfFileValue( QString oFile, QString Key )
 {
-   return getConfFileValue(oFile, Key, -1);
+   return getConfFileValue(oFile, Key, 1);
 }
 
 QString Utils::getConfFileValue( QString oFile, QString Key, int occur )
@@ -394,7 +394,7 @@
                 // If the KEY is found in the line, continue processing 
 		if ( line.trimmed().indexOf("#", 0) == 0 || line.indexOf(Key, 0) == -1 || line.indexOf(Key, 0) > 0)
 			continue;
-
+		
 	    	if ( found == occur) {
  			line.remove(line.indexOf(Key, 0), Key.length());
     



More information about the Commits mailing list