mirror of https://github.com/MidnightCommander/mc
* fish.c (fish_fill_names): New function, replacement for
generic vfs_s_fill_names() which didn't work right with fish.
This commit is contained in:
parent
ead99974fb
commit
b68a8a5ca8
|
@ -1,5 +1,8 @@
|
|||
2002-07-19 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* fish.c (fish_fill_names): New function, replacement for
|
||||
generic vfs_s_fill_names() which didn't work right with fish.
|
||||
|
||||
* undelfs.c (undelfs_opendir): Use parametrized messages without
|
||||
VFS name for success and failure.
|
||||
* fish.c (dir_load): Use new messages from undelfs.c, indicate
|
||||
|
|
33
vfs/fish.c
33
vfs/fish.c
|
@ -831,6 +831,37 @@ static struct vfs_s_data fish_data = {
|
|||
linear_close
|
||||
};
|
||||
|
||||
static void
|
||||
fish_fill_names (vfs *me, void (*func)(char *))
|
||||
{
|
||||
struct vfs_s_super * super = fish_data.supers;
|
||||
char *flags;
|
||||
char *name;
|
||||
|
||||
while (super){
|
||||
switch (SUP.flags & (FISH_FLAG_RSH | FISH_FLAG_COMPRESSED)) {
|
||||
case 0:
|
||||
flags = "";
|
||||
break;
|
||||
case FISH_FLAG_RSH:
|
||||
flags = ":r";
|
||||
break;
|
||||
case FISH_FLAG_COMPRESSED:
|
||||
flags = ":C";
|
||||
break;
|
||||
case FISH_FLAG_RSH | FISH_FLAG_COMPRESSED:
|
||||
flags = "";
|
||||
break;
|
||||
}
|
||||
|
||||
name = g_strconcat ("/#sh:", SUP.user, "@", SUP.host, flags,
|
||||
"/", SUP.cwdir, NULL);
|
||||
(*func)(name);
|
||||
g_free (name);
|
||||
super = super->next;
|
||||
}
|
||||
}
|
||||
|
||||
vfs vfs_fish_ops = {
|
||||
NULL, /* This is place of next pointer */
|
||||
"fish",
|
||||
|
@ -840,7 +871,7 @@ vfs vfs_fish_ops = {
|
|||
0, /* errno */
|
||||
NULL,
|
||||
NULL,
|
||||
vfs_s_fill_names,
|
||||
fish_fill_names,
|
||||
NULL,
|
||||
|
||||
vfs_s_open,
|
||||
|
|
Loading…
Reference in New Issue