fc-cache: make a fail if no fonts processed on a given path
This commit is contained in:
parent
af58644194
commit
db64c71408
|
@ -126,7 +126,7 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force,
|
||||||
FcStrList *sublist;
|
FcStrList *sublist;
|
||||||
FcCache *cache;
|
FcCache *cache;
|
||||||
struct stat statb;
|
struct stat statb;
|
||||||
FcBool was_valid;
|
FcBool was_valid, was_processed = FcFalse;
|
||||||
int i;
|
int i;
|
||||||
const FcChar8 *sysroot = FcConfigGetSysRoot (config);
|
const FcChar8 *sysroot = FcConfigGetSysRoot (config);
|
||||||
|
|
||||||
|
@ -175,6 +175,7 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force,
|
||||||
fprintf (stderr, "\"%s\": not a directory, skipping\n", dir);
|
fprintf (stderr, "\"%s\": not a directory, skipping\n", dir);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
was_processed = FcTrue;
|
||||||
|
|
||||||
if (really_force)
|
if (really_force)
|
||||||
FcDirCacheUnlink (dir, config);
|
FcDirCacheUnlink (dir, config);
|
||||||
|
@ -256,6 +257,8 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force,
|
||||||
else
|
else
|
||||||
FcDirCacheUnload (cache);
|
FcDirCacheUnload (cache);
|
||||||
}
|
}
|
||||||
|
if (!was_processed)
|
||||||
|
ret++;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue