Redundant leading spaces should be deleted before vfs_translate_url() call

Pavel Shirshov (pchel) me at pavelsh.pp.ru
Wed Jan 19 06:15:07 UTC 2005


Hello Jindrich,

Monday, January 17, 2005, 6:00:54 PM, you wrote:

JN> Hi mc-devel,

JN> try the following from the mc command line (not from the subshell):

JN> 1) This case works fine:

JN> cd  /#ftp:ftp.debian.org/
JN> (note there are two spaces between cd and the ftp vfs request)

JN> 2) This case fails:

JN> cd  ftp://ftp.debian.org/

JN> Error message:
JN> Cannot chdir to " ftp://ftp.debian.org/" is displayed.

JN> This failure is caused by vfs_translate_url(), because it tries to check
JN> whether the url begins with "ftp://" and substitutes it with "/#ftp:".
JN> The vfs_translate_url() returns simple g_strdup() of its argument since
JN> it begins with " ftp:/" what leads to string comparison mismatch and the
JN> chdir error. Hence the leading spaces should be deleted before
JN> vfs_translate_url() call.

JN> The patch is attached.

Committed. Thx.


-- 
Best regards,
 Pavel                            mailto:me at pavelsh.pp.ru




More information about the mc-devel mailing list