1
1

Report error if user presses enter on non-local vfs.

Этот коммит содержится в:
Pavel Machek 1998-10-16 10:26:38 +00:00
родитель 892585e1af
Коммит c4dfdf5cee
3 изменённых файлов: 11 добавлений и 4 удалений

Просмотреть файл

@ -4,6 +4,10 @@ Fri Oct 16 12:10:56 1998 Pavel Machek <pavel@atrey.karlin.mff.cuni.cz>
do_cd(). (Fixed error for here, but more such bugs are present in
src/ tree. Or maybe move error checking into do_cd?)
* command.c: warn user if he is pressing enter while on non-local
filesystem. (Prev. behaviour was fail silently to do anything,
which is _bad_.)
Mon Oct 12 22:47:53 1998 Pavel Machek <pavel@bug.ucw.cz>
* file.c (copy_file_file): MCCTL_SETREMOTECOPY is no longer used

Просмотреть файл

@ -250,7 +250,7 @@ static void do_view_cmd (WPanel *panel, int normal)
}
}
if (!do_cd (selection (panel)->fname, cd_exact))
message_1s(1, MSG_ERROR, _("Could not change directory") );
message (1, MSG_ERROR, _("Could not change directory") );
return;
@ -712,7 +712,7 @@ void quick_chdir_cmd (void)
tree_chdir (the_tree, target);
else
if (!do_cd (target, cd_exact))
message_1s(1, MSG_ERROR, _("Could not change directory") );
message (1, MSG_ERROR, _("Could not change directory") );
free (target);
}
@ -726,7 +726,7 @@ void reselect_vfs (void)
return;
if (!do_cd (target, cd_exact))
message_1s(1, MSG_ERROR, _("Could not change directory") );
message (1, MSG_ERROR, _("Could not change directory") );
free (target);
}
#endif

Просмотреть файл

@ -197,8 +197,11 @@ static int enter (WCommand *cmdline)
char *command, *s;
int i, j;
if (!vfs_current_is_local ())
if (!vfs_current_is_local ()) {
message (1, MSG_ERROR, _(" You can not execute commands on non-local filesystems"));
return MSG_NOT_HANDLED;
}
command = xmalloc (strlen (cmd) + 1, "main, enter");
command [0] = 0;
for (i = j = 0; i < strlen (cmd); i ++){