From 4a373a3e9ac07a2d4c43d495c0a44883106ecfde Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 5 Jan 2004 16:26:43 +0000 Subject: * Implemented Eelco V.'s `nix-env -I' command to specify the default path of the Nix expression to be used with the import, upgrade, and query commands. For instance, $ nix-env -I ~/nixpkgs/pkgs/system/i686-linux.nix $ nix-env --query --available [aka -qa] sylpheed-0.9.7 bison-1.875 pango-1.2.5 subversion-0.35.1 ... $ nix-env -i sylpheed $ nix-env -u subversion There can be only one default at a time. * If the path to a Nix expression is a symlink, follow the symlink prior to resolving relative path references in the expression. --- src/libutil/archive.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/libutil/archive.cc') diff --git a/src/libutil/archive.cc b/src/libutil/archive.cc index f605e8b61954..90a039164b58 100644 --- a/src/libutil/archive.cc +++ b/src/libutil/archive.cc @@ -122,11 +122,8 @@ static void dump(const Path & path, DumpSink & sink) else if (S_ISLNK(st.st_mode)) { writeString("type", sink); writeString("symlink", sink); - char buf[st.st_size]; - if (readlink(path.c_str(), buf, st.st_size) != st.st_size) - throw SysError("reading symbolic link " + path); writeString("target", sink); - writeString(string(buf, st.st_size), sink); + writeString(readLink(path), sink); } else throw Error("unknown file type: " + path); -- cgit 1.4.1