瀏覽代碼

reintroduce #clear and #include in the config files,
they there broken since 0.7.21 with the introduction of #-comments

David Kalnischkies 17 年之前
父節點
當前提交
c914647fb0
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      apt-pkg/contrib/configuration.cc

+ 5 - 3
apt-pkg/contrib/configuration.cc

@@ -601,9 +601,11 @@ bool ReadConfigFile(Configuration &Conf,const string &FName,bool AsSectional,
 	    InQuote = !InQuote;
 	    InQuote = !InQuote;
 	 if (InQuote == true)
 	 if (InQuote == true)
 	    continue;
 	    continue;
-	 
-	 if ((*I == '/' && I + 1 != End && I[1] == '/') || *I == '#')
-         {
+
+	 if ((*I == '/' && I + 1 != End && I[1] == '/') ||
+	     (*I == '#' && strcmp(string(I,I+6).c_str(),"#clear") != 0 &&
+	      strcmp(string(I,I+8).c_str(),"#include") != 0))
+	 {
 	    End = I;
 	    End = I;
 	    break;
 	    break;
 	 }
 	 }