aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2017-08-08 16:05:58 +0200
committerRicardo Wurmus <rekado@elephly.net>2017-08-09 14:46:48 +0200
commit32b7506c987d8b7281382da4831958a64c048fc1 (patch)
tree92321b732614430e68a78ce913f206561b0100f4 /guix
parent2d9495da23cb110dd70eac67637f8e362133d021 (diff)
downloadgnu-guix-32b7506c987d8b7281382da4831958a64c048fc1.tar
gnu-guix-32b7506c987d8b7281382da4831958a64c048fc1.tar.gz
profiles: Only check file contents if the file exists.
* guix/profiles.scm (fonts-dir-file): Check that files exist before using "empty-file?".
Diffstat (limited to 'guix')
-rw-r--r--guix/profiles.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/guix/profiles.scm b/guix/profiles.scm
index b3732f61ed..0eb99f40de 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)))))))