about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nix-store/nix-store.cc33
1 files changed, 1 insertions, 32 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc
index f2621a9954bf..932789f2c071 100644
--- a/src/nix-store/nix-store.cc
+++ b/src/nix-store/nix-store.cc
@@ -956,39 +956,8 @@ static void opServe(Strings opFlags, Strings opArgs)
 
             case cmdImportPaths: {
                 if (!writeAllowed) throw Error("importing paths is not allowed");
-                string compression = readString(in);
-
-                if (compression != "") {
-                    if (compression != "gzip" && compression != "bzip2" && compression != "xz")
-                        throw Error(format("unsupported compression method `%1%'") % compression);
-
-                    Pipe fromDecompressor;
-                    fromDecompressor.create();
-
-                    Pid pid = startProcess([&]() {
-                        fromDecompressor.readSide.close();
-                        if (dup2(fromDecompressor.writeSide, STDOUT_FILENO) == -1)
-                            throw SysError("dupping stdout");
-                        // FIXME: use absolute path.
-                        execlp(compression.c_str(), compression.c_str(), "-d", NULL);
-                        throw SysError(format("executing `%1%'") % compression);
-                    });
-
-                    fromDecompressor.writeSide.close();
-
-                    FdSource fromDecompressor_(fromDecompressor.readSide);
-                    store->importPaths(false, fromDecompressor_);
-
-                    pid.wait(true);
-                } else
-                    store->importPaths(false, in);
-
+                store->importPaths(false, in);
                 writeInt(1, out); // indicate success
-
-                /* The decompressor will have left stdin in an
-                   undefined state, so we can't continue. */
-                if (compression != "") return;
-
                 break;
             }