guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/05: git-download: Fix 'git-predicate' to use absolute paths.


From: Ludovic Courtès
Subject: 01/05: git-download: Fix 'git-predicate' to use absolute paths.
Date: Tue, 30 May 2017 12:08:50 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 151cb9738a1903670acfee8cc28b5a2e441172ce
Author: Christopher Baines <address@hidden>
Date:   Thu May 25 16:58:23 2017 +0100

    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 <address@hidden>
---
 guix/git-download.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/guix/git-download.scm b/guix/git-download.scm
index 9f6d20e..3168355 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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]