Redundant leading spaces should be deleted before vfs_translate_url() call
Jindrich Novy
jnovy at redhat.com
Mon Jan 17 13:00:54 UTC 2005
Hi mc-devel,
try the following from the mc command line (not from the subshell):
1) This case works fine:
cd /#ftp:ftp.debian.org/
(note there are two spaces between cd and the ftp vfs request)
2) This case fails:
cd ftp://ftp.debian.org/
Error message:
Cannot chdir to " ftp://ftp.debian.org/" is displayed.
This failure is caused by vfs_translate_url(), because it tries to check
whether the url begins with "ftp://" and substitutes it with "/#ftp:".
The vfs_translate_url() returns simple g_strdup() of its argument since
it begins with " ftp:/" what leads to string comparison mismatch and the
chdir error. Hence the leading spaces should be deleted before
vfs_translate_url() call.
The patch is attached.
cheers,
Jindrich
--
Jindrich Novy <jnovy at redhat.com>, http://people.redhat.com/jnovy/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mc-4.6.1a-badspaces.patch
Type: text/x-patch
Size: 722 bytes
Desc: not available
URL: <http://lists.midnight-commander.org/pipermail/mc-devel/attachments/20050117/be160a55/attachment.bin>
More information about the mc-devel
mailing list