[Fontconfig] [PATCH] Do not remove UUID file when a scanned directory is empty

Keith Packard keithp at keithp.com
Fri Oct 26 19:35:48 UTC 2018


Akira TAGOH <akira at tagoh.org> writes:

> Removed from where? fontconfig still has it at least though.

When a directory has no subdirectories or font files, we get:

        Create UUID file (preserving mtime)
        scan directory
        Remove UUID (updating mtime)

This happens every time anyone scans the directory, so the mtime is
changed at each scan.

Could these UUID files be placed in the cache directory instead of the
font directories? That would avoid the directory mtime problem
entirely.

> Resetting the mod timestamp of the directory seems not help for
> AppArmor issue at least. they don't want to see the file
> creatioin/removal at the runtime.

That makes sense -- random applications should not be writing to font
directories. If the UUID files need to live in the font directories,
they should only be created by fc-cache.

I would argue that they should not be removed for empty directories; the
presence of the UUID file should be the signal that fc-cache has scanned
a directory; removing it for empty directories makes this signal
ambiguous.

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/fontconfig/attachments/20181026/319b48eb/attachment.sig>


More information about the Fontconfig mailing list