From 6f5c51f050f69cf9549310cd6e8060f8bc612b15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Henry?= Date: Wed, 8 Nov 2017 15:46:57 +0100 Subject: [PATCH] Client: ignore empty files --- src/client/client_aliases.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/client_aliases.ml b/src/client/client_aliases.ml index 776a3efe5..62548d8f7 100644 --- a/src/client/client_aliases.ml +++ b/src/client/client_aliases.ml @@ -99,7 +99,8 @@ module Alias = functor (Entity : Entity) -> struct let load cctxt = let filename = filename cctxt in - if not (Sys.file_exists filename) then + if not (Sys.file_exists filename) || + Unix.(stat filename).st_size = 0 then return [] else Data_encoding_ezjsonm.read_file filename