diamondburned / gotk4

Autogenerated GTK4 bindings for Go
GNU Affero General Public License v3.0
525 stars 20 forks source link

Fix location of GIR files with root only subdirectories #120

Closed janvhs closed 10 months ago

janvhs commented 10 months ago

Some subdirectories of my /usr/ folder can not be opened without root permissions. Therefore, the generation process fails with a permission denied error. This patch instructs the generator to skip those directories.

diamondburned commented 10 months ago

Would a better approach be to log on any error and ignore it?

diamondburned commented 10 months ago

There doesn't seem to be any existing logging facilities in this package, so this is probably fine.

janvhs commented 10 months ago

Normally yes, but I don't think that logging this would be needed, as the GIR files are usually located under /usr/share/gir-1.0 and that should always be readable.

Furthermore, if it happens that the GIR files are not accessible, the generator would create an error that it cannot find these files and at this point it is quite easy to debug.