mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
lib/filesystem: remove absolute path literals (#514225)
This commit is contained in:
commit
629f0f2c6c
1 changed files with 2 additions and 2 deletions
|
|
@ -201,7 +201,7 @@ in
|
||||||
in
|
in
|
||||||
if builtins.length matches != 0 then
|
if builtins.length matches != 0 then
|
||||||
{ inherit path matches; }
|
{ inherit path matches; }
|
||||||
else if path == /. then
|
else if toString path == "/" then
|
||||||
null
|
null
|
||||||
else
|
else
|
||||||
go (dirOf path);
|
go (dirOf path);
|
||||||
|
|
@ -211,7 +211,7 @@ in
|
||||||
base = baseNameOf file;
|
base = baseNameOf file;
|
||||||
type = (builtins.readDir parent).${base} or null;
|
type = (builtins.readDir parent).${base} or null;
|
||||||
in
|
in
|
||||||
file == /. || type == "directory";
|
toString file == "/" || type == "directory";
|
||||||
in
|
in
|
||||||
go (if isDir then file else parent);
|
go (if isDir then file else parent);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue