--list-scripts fails when files are read-only
Doing something like
highlight --list-scripts=lang can fail if every file in the search directory is read only (0444).
This is the case with Nixpkgs—every file in
langDefs/ if 0444—and so the results are like this:
$ highlight --list-scripts=langs highlight: Could not access directory /nix/store/zbwimns6ixicszhgz0b0dvcn0n1xyg4x-highlight-3.56/share/highlight/langDefs/*.lang, aborted.
Highlight will function properly otherwise, it just won't be able to list anything when invoked with
Read-only files are excluded in platform_fs.cpp. It seems like they shouldn't be, since the language definitions do not need to be written to, and Highlight reads them anyway in the course of normal highlighting.