diff options
author | Mark H Weaver <mhw@netris.org> | 2015-06-21 14:30:22 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2015-06-21 14:30:22 -0400 |
commit | bf76d98789a0fc6303c303beddbc1ed609f2a6ea (patch) | |
tree | 1df8db2fa06f6826a1c7a1cb1faa253df704834e /guix/store.scm | |
parent | fc9ff915b3cfcb494dbb5c8ab767972352fa31da (diff) | |
parent | 12b04cbee6b9c725db8a5c898b597de8e667bef0 (diff) |
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/store.scm')
-rw-r--r-- | guix/store.scm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/guix/store.scm b/guix/store.scm index 933708defc..7b13334952 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -610,11 +610,12 @@ path." store-path))) (lambda (server basename recursive? hash-algo file-name) "Add the contents of FILE-NAME under BASENAME to the store. When -RECURSIVE? is true and FILE-NAME designates a directory, the contents of -FILE-NAME are added recursively; if FILE-NAME designates a flat file and -RECURSIVE? is true, its contents are added, and its permission bits are -kept. HASH-ALGO must be a string such as \"sha256\"." - (let* ((st (stat file-name #f)) +RECURSIVE? is false, FILE-NAME must designate a regular file--not a directory +nor a symlink. When RECURSIVE? is true and FILE-NAME designates a directory, +the contents of FILE-NAME are added recursively; if FILE-NAME designates a +flat file and RECURSIVE? is true, its contents are added, and its permission +bits are kept. HASH-ALGO must be a string such as \"sha256\"." + (let* ((st (false-if-exception (lstat file-name))) (args `(,st ,basename ,recursive? ,hash-algo)) (cache (nix-server-add-to-store-cache server))) (or (and st (hash-ref cache args)) |