* main.c (_do_panel_cd): Delete leading spaces from URL

before vfs_translate_url() call.
This commit is contained in:
Andrew V. Samoilov 2005-01-19 06:14:44 +00:00
parent 50a2118525
commit 0464629b20
2 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2005-01-19 Jindrich Novy <jnovy@redhat.com>
* main.c (_do_panel_cd): Delete leading spaces from URL
before vfs_translate_url() call.
2005-01-14 Andrew V. Samoilov <sav@bcs.zp.ua>
* subshell.c (subshell_name_quote): Eliminate sprintf(d, "%c", ...).

View File

@ -567,15 +567,17 @@ _do_panel_cd (WPanel *panel, const char *new_dir, enum cd_enum cd_type)
char temp[MC_MAXPATHLEN];
char *translated_url;
if (cd_type == cd_parse_command) {
while (*new_dir == ' ')
new_dir++;
}
olddir = g_strdup (panel->cwd);
new_dir = translated_url = vfs_translate_url (new_dir);
/* Convert *new_path to a suitable pathname, handle ~user */
if (cd_type == cd_parse_command) {
while (*new_dir == ' ')
new_dir++;
if (!strcmp (new_dir, "-")) {
strcpy (temp, panel->lwd);
new_dir = temp;