From b68a8a5ca8c07bd9d0061ee18a38d5013f6b35d5 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Fri, 19 Jul 2002 05:29:31 +0000 Subject: [PATCH] * fish.c (fish_fill_names): New function, replacement for generic vfs_s_fill_names() which didn't work right with fish. --- vfs/ChangeLog | 3 +++ vfs/fish.c | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/vfs/ChangeLog b/vfs/ChangeLog index e21a6435a..c0bd10afd 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,5 +1,8 @@ 2002-07-19 Pavel Roskin + * 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 diff --git a/vfs/fish.c b/vfs/fish.c index 44a841217..4dc59d074 100644 --- a/vfs/fish.c +++ b/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,