about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/nix.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/nix.cc b/src/nix.cc
index a4d2898f1585..1875689990a4 100644
--- a/src/nix.cc
+++ b/src/nix.cc
@@ -93,17 +93,15 @@ static void opQuery(Strings opFlags, Strings opArgs)
     switch (query) {
         
         case qList: {
-            PathSet paths;
             for (Strings::iterator i = opArgs.begin();
                  i != opArgs.end(); i++)
             {
-                StringSet paths2 = nixExprRoots(
+                StringSet paths = nixExprRoots(
                     maybeNormalise(checkPath(*i), normalise));
-                paths.insert(paths2.begin(), paths2.end());
+                for (StringSet::iterator j = paths.begin(); 
+                     j != paths.end(); j++)
+                    cout << format("%s\n") % *j;
             }
-            for (StringSet::iterator i = paths.begin(); 
-                 i != paths.end(); i++)
-                cout << format("%s\n") % *i;
             break;
         }