Просмотр исходного кода

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

David Kalnischkies лет назад: 17
Родитель
Сommit
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;
 	 if (InQuote == true)
 	    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;
 	    break;
 	 }