Double // in codepages list error

Pavel Roskin proski at gnu.org
Sun Aug 12 03:12:19 UTC 2001


Hi, David!

> Here's the quick fix using concat_dir_and_file.

The problem is not in the error message.  concat_dir_and_file() should be
used in load_codepages_list() (it is not used) and the message should be
there, because only that function knows what happened, what file it
_actually_ tried to open and whether the problem is worth user's
attention.

Guessing what file load_codepages_list() was trying to load is a bad
idea.  load_codepages_list() always uses '/', while concat_dir_and_file()
used the OS-specific path separator.

It may happen that load_codepages_list() e.g. on Windows tries to load
"\usr\local\lib\mc/mc.charsets" while load_setup() would say that
"\usr\local\lib\mc\mc.charsets" could not be loaded.  That could mean
hiding a problem, which defeats the whole purpose of this message.

I understand that my criticism really should be directed at Walery, but
I'm asking everybody to clean up the code being modified instead of piling
one "quick fix" onto another.

I'm not applying your patch - it cures the symptoms, not the disease.

By the way, if you _have_ to introduce a new translatable message please
avoid that british "Can't" - write "Cannot" instead.

-- 
Regards,
Pavel Roskin





More information about the mc-devel mailing list