diff mbox series

[bug#36537] discovery: Handle edge case in scheme-files when looking at symlinks.

Message ID 20190707112102.8908-1-mail@cbaines.net
State Accepted
Headers show
Series [bug#36537] discovery: Handle edge case in scheme-files when looking at symlinks. | expand

Commit Message

Christopher Baines July 7, 2019, 11:21 a.m. UTC
Previously, this code would cause crashes in Guix (running guix package -s for
example) which could be experienced when Emacs creates temporary files in the
gnu/packages/patches directory when a patch file has been edited, but not
saved.

* guix/discovery.scm (scheme-files): Add else clause to cond used when
handling symlinks.
---
 guix/discovery.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Ludovic Courtès July 8, 2019, 10:59 a.m. UTC | #1
Hi Chris,

Christopher Baines <mail@cbaines.net> skribis:

> Previously, this code would cause crashes in Guix (running guix package -s for
> example) which could be experienced when Emacs creates temporary files in the
> gnu/packages/patches directory when a patch file has been edited, but not
> saved.
>
> * guix/discovery.scm (scheme-files): Add else clause to cond used when
> handling symlinks.

Good catch, LGTM!

Thank you,
Ludo’.
Christopher Baines July 8, 2019, 4:56 p.m. UTC | #2
Ludovic Courtès <ludo@gnu.org> writes:

> Hi Chris,
>
> Christopher Baines <mail@cbaines.net> skribis:
>
>> Previously, this code would cause crashes in Guix (running guix package -s for
>> example) which could be experienced when Emacs creates temporary files in the
>> gnu/packages/patches directory when a patch file has been edited, but not
>> saved.
>>
>> * guix/discovery.scm (scheme-files): Add else clause to cond used when
>> handling symlinks.
>
> Good catch, LGTM!

Great, I've pushed this now :)
diff mbox series

Patch

diff --git a/guix/discovery.scm b/guix/discovery.scm
index 5bb494941b..86f20ec344 100644
--- a/guix/discovery.scm
+++ b/guix/discovery.scm
@@ -78,7 +78,9 @@  DIRECTORY is not accessible."
                                  ((= stat:type 'directory)
                                   (append (scheme-files absolute)
                                           result))
-                                 (_ result)))))
+                                 (_ result)))
+                              (else
+                               result)))
                        (else
                         result))))))
               '()