Author: eelco
Date: Sat Aug 6 18:45:28 2011
New Revision: 28200
URL: https://svn.nixos.org/websvn/nix/?rev=28200&sc=1
Log:
* Handle the case where the search path element is a regular file.
Modified:
nix/trunk/src/libexpr/parser.y
Modified: nix/trunk/src/libexpr/parser.y
==============================================================================
--- nix/trunk/src/libexpr/parser.y Sat Aug 6 18:24:43 2011 (r28199)
+++ nix/trunk/src/libexpr/parser.y Sat Aug 6 18:45:28 2011 (r28200)
@@ -558,7 +558,8 @@
if (path.compare(0, i->first.size(), i->first) != 0 ||
(path.size() > i->first.size() && path[i->first.size()] !=
'/'))
continue;
- res = i->second + "/" + string(path, i->first.size());
+ res = i->second +
+ (path.size() == i->first.size() ? "" : "/" + string(path,
i->first.size()));
}
if (pathExists(res)) return canonPath(res);
}
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits