Client: ignore empty files
This commit is contained in:
parent
0e2a751408
commit
6f5c51f050
@ -99,7 +99,8 @@ module Alias = functor (Entity : Entity) -> struct
|
|||||||
|
|
||||||
let load cctxt =
|
let load cctxt =
|
||||||
let filename = filename cctxt in
|
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 []
|
return []
|
||||||
else
|
else
|
||||||
Data_encoding_ezjsonm.read_file filename
|
Data_encoding_ezjsonm.read_file filename
|
||||||
|
Loading…
Reference in New Issue
Block a user