guix-commits
[Top][All Lists]
Advanced

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

01/01: profiles: Only check file contents if the file exists.


From: Ricardo Wurmus
Subject: 01/01: profiles: Only check file contents if the file exists.
Date: Wed, 9 Aug 2017 08:47:22 -0400 (EDT)

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

commit 32b7506c987d8b7281382da4831958a64c048fc1
Author: Ricardo Wurmus <address@hidden>
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

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