git.iko.soy/typeable/nixpkgs
on master help sign in
lib.cleanSourceFilter: Fix VIM swap file filtering

The backslash wasn't properly escaped, and "\." is apparently equal to ".". So it's accidentally filtering out these valid file names (in Nixpkgs): trace: excluding clfswm trace: excluding larswm trace: excluding mkpasswd While at it, turn the file filter stricter to what it was before e2589b3ca22c93029051efcde62aa773fe3085b4. That is, the file name must start with a dot: '.swp', '.foo.swo' are filtered but 'bar.swf' is not.

commit9275c3387efa18402674e92dc03da51ae0d41d12 authorTuomas Tynkkynen <tuomas.tynkkynen@iki.fi> dateTue 12 Sep 2017, 14:50 (9 years ago) parent8f566f4
1 file changed+3−2
lib/sources.nix+3−2
lib/sources.nix+3−2
@@ -15,9 +15,10 @@ rec {
1515 cleanSourceFilter = name: type: let baseName = baseNameOf (toString name); in ! (
1616 # Filter out Subversion and CVS directories.
1717 (type == "directory" && (baseName == ".git" || baseName == ".svn" || baseName == "CVS" || baseName == ".hg")) ||
18− # Filter out backup files.
18+ # Filter out editor backup / swap files.
1919 lib.hasSuffix "~" baseName ||
20− builtins.match "^.*\.sw[a-z]$" baseName != null ||
20+ builtins.match "^\\.sw[a-z]$" baseName != null ||
21+ builtins.match "^\\..*\\.sw[a-z]$" baseName != null ||
2122
2223 # Filter out generates files.
2324 lib.hasSuffix ".o" baseName ||