summaryrefslogtreecommitdiff
path: root/gnu/packages/guile.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-06-22 12:29:15 +0200
committerLudovic Courtès <ludo@gnu.org>2020-06-22 15:42:55 +0200
commitfe5de925aa0f2854a679cebdea02b03cac561c8f (patch)
tree7c256a5c405b677c7ab7994c06aa20db17c99978 /gnu/packages/guile.scm
parenta0d419e63955c50c270e0697af3eb74ac321b108 (diff)
deduplicate: Avoid traversing directories twice.
Until now, we'd call (nar-sha256 file) unconditionally. Thus, if FILE was a directory, we would traverse it for no reason, and then call 'deduplicate' on FILE, which would again traverse it. This change also removes redundant (mkdir-p store) calls from the loop, and avoids 'lstat' calls by using 'scandir*'. * guix/store/deduplication.scm (deduplicate): Add named loop. Move 'mkdir-p' outside the loop. Use 'scandir*' instead of 'scandir'. Do not call 'nar-sha256' when FILE has type 'directory.
Diffstat (limited to 'gnu/packages/guile.scm')
0 files changed, 0 insertions, 0 deletions