network: do not propagte error on stat()

This commit is contained in:
Yu Watanabe 2020-06-01 16:19:50 +09:00
parent 63e2d1714e
commit c4473dec34
1 changed files with 2 additions and 3 deletions

View File

@ -538,9 +538,8 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi
network->filename);
struct stat stats;
if (stat(filename, &stats) < 0)
return -errno;
network->timestamp = timespec_load(&stats.st_mtim);
if (stat(filename, &stats) >= 0)
network->timestamp = timespec_load(&stats.st_mtim);
if (network_verify(network) < 0)
/* Ignore .network files that do not match the conditions. */