> From: Gavin Smith <[email protected]> > Date: Fri, 6 Nov 2020 20:37:09 +0000 > Cc: [email protected] > > The problem was that although /usr/share/info/dir didn't exist, > /usr/share/info/dir.gz did. install-info finds and uses the > compressed file, but apparently info doesn't. I don't know exactly > how I got the compressed dir file (probably something to do with the > OS distribution), but I see no reason why this shouldn't be supported. > > There is this comment in the source code: > > /* Using each element of the path, check for one of the files in > DIRS_TO_ADD. Do not check for "localdir.info.Z" or anything else. > Only files explictly named are eligible. This is a design decision. > There can be an info file name "localdir.info" which contains > information on the setting up of "localdir" files. */ > > where 'dirs_to_add' is an array containing only the strings "dir" > and "localdir". I'd be happy to disregard this comment as I doubt > anybody has ever used "localdir" files since this was written. > I'm going to try to use the same code to find the dir file as the > code that finds other files, and then the compressed file extensions > would be supported.
I think we should be able to find dir.gz, but not dir.info.gz, because the latter could be a compressed file dir.info which documents a program called 'dir'. And the same with localdir. At the time, I think there were many Info files without a .info extension, mainly to cater to filesystems that had problems with multiple extensions and long file names, thus the comment above. But nowadays, it's very hard to find Info files without a .info extension, and thus dir and localdir stand out, and we can handle them specially without failing to support them in compressed form.
