rekado pushed a commit to branch core-updates
in repository guix.

commit 32b7506c987d8b7281382da4831958a64c048fc1
Author: Ricardo Wurmus <rek...@elephly.net>
Date:   Tue Aug 8 16:05:58 2017 +0200

    profiles: Only check file contents if the file exists.
    
    * guix/profiles.scm (fonts-dir-file): Check that files exist before using
    "empty-file?".
---
 guix/profiles.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/guix/profiles.scm b/guix/profiles.scm
index b3732f6..0eb99f4 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -1095,9 +1095,11 @@ files for the fonts of the @var{manifest} entries."
                                 (unless (and (zero? (system* mkfontscale))
                                              (zero? (system* mkfontdir)))
                                   (exit #f))
-                                (when (empty-file? fonts-scale-file)
+                                (when (and (file-exists? fonts-scale-file)
+                                           (empty-file? fonts-scale-file))
                                   (delete-file fonts-scale-file))
-                                (when (empty-file? fonts-dir-file)
+                                (when (and (file-exists? fonts-dir-file)
+                                           (empty-file? fonts-dir-file))
                                   (delete-file fonts-dir-file))))
                             directories)))))))
 

Reply via email to