about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2008-02-12 10:08:57 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2008-02-12 10:08:57 +0000
commit28d2f608c61628cd429f3dcc3c6fad6ebaec8ff9 (patch)
tree3db5591b9251b452fdfca174d8efb0b37ca4774a
parentc3096df3d083eccee25facd46b5a25ba70b6143b (diff)
downloadnixlib-28d2f608c61628cd429f3dcc3c6fad6ebaec8ff9.tar
nixlib-28d2f608c61628cd429f3dcc3c6fad6ebaec8ff9.tar.gz
nixlib-28d2f608c61628cd429f3dcc3c6fad6ebaec8ff9.tar.bz2
nixlib-28d2f608c61628cd429f3dcc3c6fad6ebaec8ff9.tar.lz
nixlib-28d2f608c61628cd429f3dcc3c6fad6ebaec8ff9.tar.xz
nixlib-28d2f608c61628cd429f3dcc3c6fad6ebaec8ff9.tar.zst
nixlib-28d2f608c61628cd429f3dcc3c6fad6ebaec8ff9.zip
* Doh! cleanSource was broken; it didn't actually get rid of
  .svn and CVS directories.

svn path=/nixpkgs/trunk/; revision=10635
-rw-r--r--pkgs/lib/default.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/lib/default.nix b/pkgs/lib/default.nix
index f6ce083d970c..2674c883888b 100644
--- a/pkgs/lib/default.nix
+++ b/pkgs/lib/default.nix
@@ -153,15 +153,16 @@ rec {
        substring (sub lenFileName lenExt) lenFileName fileName == ext;
 
   hasSuffixHack = a: b: hasSuffix (a+(substring 0 0 b)) ((substring 0 0 a)+b);
-       
+
+         
   # Bring in a path as a source, filtering out all Subversion and CVS
   # directories, as well as backup files (*~).
   cleanSource =
     let filter = name: type: let baseName = baseNameOf (toString name); in ! (
       # Filter out Subversion and CVS directories.
-      (type == "directory" && (name == ".svn" || name == "CVS")) ||
+      (type == "directory" && (baseName == ".svn" || baseName == "CVS")) ||
       # Filter out backup files.
-      (hasSuffix "~" name)
+      (hasSuffix "~" baseName)
     );
     in src: builtins.filterSource filter src;