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

rred: Only call pkgInitConfig() in test mode

This accidentally slipped in in a previous commit, but it should
be used only for testing mode.

Reported-By: David Kalnischkies <david@kalnischkies.de>
Julian Andres Klode лет назад: 10
Родитель
Сommit
18b1628146
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      methods/rred.cc

+ 2 - 2
methods/rred.cc

@@ -693,8 +693,6 @@ int main(int argc, char **argv)
    bool test = false;
    Patch patch;
 
-   pkgInitConfig(*_config);
-
    if (argc <= 1) {
       RredMethod Mth;
       return Mth.Run();
@@ -702,6 +700,8 @@ int main(int argc, char **argv)
 
    // Usage: rred -t input output diff ...
    if (argc > 1 && strcmp(argv[1], "-t") == 0) {
+      // Read config files so we see compressors.
+      pkgInitConfig(*_config);
       just_diff = false;
       test = true;
       i = 4;