diff options
author | Christopher Baines <mail@cbaines.net> | 2017-05-25 16:58:23 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-05-30 18:08:37 +0200 |
commit | 151cb9738a1903670acfee8cc28b5a2e441172ce (patch) | |
tree | 32c845c15599534603608feaf686e5646c797577 /guix | |
parent | 294739b5b85c07c1b6d44a27444e1bcb18f59fa5 (diff) | |
download | gnu-guix-151cb9738a1903670acfee8cc28b5a2e441172ce.tar gnu-guix-151cb9738a1903670acfee8cc28b5a2e441172ce.tar.gz |
git-download: Fix 'git-predicate' to use absolute paths.
git ls-files will return paths relative to the repository directory. This
commit prepends the repository directory to those paths when calling lstat,
such that 'git-predicate' works if the current working directory is not the
repository directory.
* guix/git-download.scm (git-predicate): Prepend repository directory to the
file path when calling lstat.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'guix')
-rw-r--r-- | guix/git-download.scm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/guix/git-download.scm b/guix/git-download.scm index 9f6d20ee38..316835502c 100644 --- a/guix/git-download.scm +++ b/guix/git-download.scm @@ -146,7 +146,8 @@ absolute file name and STAT is the result of 'lstat'." (line (loop (cons line lines)))))) (inodes (map (lambda (file) - (let ((stat (lstat file))) + (let ((stat (lstat + (string-append directory "/" file)))) (cons (stat:dev stat) (stat:ino stat)))) files)) (status (close-pipe pipe))) |