Do not try updating mtime when unlink was failed
This commit is contained in:
parent
ff5b49be2b
commit
5f5ec5676c
|
@ -171,6 +171,8 @@ FcDirCacheDeleteUUID (const FcChar8 *dir,
|
|||
}
|
||||
target = FcStrBuildFilename (d, ".uuid", NULL);
|
||||
ret = unlink ((char *) target) == 0;
|
||||
if (ret)
|
||||
{
|
||||
times[0].tv_sec = statb.st_atime;
|
||||
times[1].tv_sec = statb.st_mtime;
|
||||
#ifdef HAVE_STRUCT_STAT_ST_MTIM
|
||||
|
@ -185,6 +187,7 @@ FcDirCacheDeleteUUID (const FcChar8 *dir,
|
|||
fprintf (stderr, "Unable to revert mtime: %s\n", d);
|
||||
}
|
||||
FcHashTableRemove (config->uuid_table, target);
|
||||
}
|
||||
FcStrFree (target);
|
||||
bail:
|
||||
FcStrFree (d);
|
||||
|
|
Loading…
Reference in New Issue