Mon Jun 1 15:41:20 1998 Norbert Warmuth <k3190@fh-sw.de>
* main.c (translate_url_to_new_syntax): translate the common ftp url syntax to the syntax used by the new vfs code. (_do_panel_cd): First translate the path if necessary. This makes it possible to enter ftp://host on the commandline and in the directory hotlist. We might need to move the translation code to the vfs layer if there are other places where we want to enter ftp://host. Mon Jun 1 16:00:19 1998 Norbert Warmuth <k3190@fh-sw.de> * vfs/ftpfs.c (ftpfs_fill_names): use right character to seperate prefix and username
Этот коммит содержится в:
родитель
5a5fad89f8
Коммит
3550827e81
@ -1,3 +1,14 @@
|
||||
Mon Jun 1 15:41:20 1998 Norbert Warmuth <k3190@fh-sw.de>
|
||||
|
||||
* main.c (translate_url_to_new_syntax): translate the common
|
||||
ftp url syntax to the syntax used by the new vfs code.
|
||||
|
||||
(_do_panel_cd): First translate the path if necessary. This makes
|
||||
it possible to enter ftp://host on the commandline and in the
|
||||
directory hotlist. We might need to move the translation code
|
||||
to the vfs layer if there are other places where we want to enter
|
||||
ftp://host.
|
||||
|
||||
Mon Jun 1 12:33:08 1998 Alexander V. Lukyanov <lav@yars.free.net>
|
||||
|
||||
* configure.in: allowed to use `configure --with-included-gettext'
|
||||
|
16
src/main.c
16
src/main.c
@ -926,18 +926,32 @@ directory_history_add (WPanel * panel, char *s)
|
||||
panel_update_marks (panel);
|
||||
}
|
||||
|
||||
/* Translate ftp://user:password@host/directory to
|
||||
#ftp:user:password@host/directory.
|
||||
*/
|
||||
static char *
|
||||
translate_url_to_new_syntax (const char *p)
|
||||
{
|
||||
if (strncmp (p, "ftp://", 6) == 0)
|
||||
return copy_strings ("#ftp:", p + 6, 0);
|
||||
else
|
||||
return strdup (p);
|
||||
}
|
||||
|
||||
/* Changes the current panel directory */
|
||||
int
|
||||
_do_panel_cd (WPanel *panel, char *new_dir, enum cd_enum cd_type)
|
||||
{
|
||||
char *directory, *olddir;
|
||||
char temp [MC_MAXPATHLEN];
|
||||
char *translated_url;
|
||||
#ifdef USE_VFS
|
||||
vfs *oldvfs;
|
||||
vfsid oldvfsid;
|
||||
struct vfs_stamping *parent;
|
||||
#endif
|
||||
olddir = strdup (panel->cwd);
|
||||
translated_url = new_dir = translate_url_to_new_syntax (new_dir);
|
||||
|
||||
/* Convert *new_path to a suitable pathname, handle ~user */
|
||||
|
||||
@ -955,8 +969,10 @@ _do_panel_cd (WPanel *panel, char *new_dir, enum cd_enum cd_type)
|
||||
if (mc_chdir (directory) == -1){
|
||||
strcpy (panel->cwd, olddir);
|
||||
free (olddir);
|
||||
free (translated_url);
|
||||
return 0;
|
||||
}
|
||||
free (translated_url);
|
||||
|
||||
/* Success: save previous directory, shutdown status of previous dir */
|
||||
strcpy (panel->lwd, olddir);
|
||||
|
@ -1,3 +1,8 @@
|
||||
Mon Jun 1 16:00:19 1998 Norbert Warmuth <k3190@fh-sw.de>
|
||||
|
||||
* ftpfs.c (ftpfs_fill_names): use right character to seperate
|
||||
prefix and username
|
||||
|
||||
Mon Jun 1 14:19:20 1998 Bakeyev I. Timur <timur@comtat.kazan.ru>
|
||||
* vfs.c (parse_ls_lga): allow a bit wider range of listings.
|
||||
|
||||
|
@ -1008,7 +1008,7 @@ void ftpfs_fill_names (void (*func)(char *))
|
||||
do {
|
||||
if ((bucket = lptr->data) != 0){
|
||||
|
||||
path_name = copy_strings ("/#ftp.", quser (bucket),
|
||||
path_name = copy_strings ("/#ftp:", quser (bucket),
|
||||
"@", qhost (bucket),
|
||||
qcdir(bucket), 0);
|
||||
(*func)(path_name);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user