Ticket #118: 11105-fish.c.port.patch
File 11105-fish.c.port.patch, 1.6 KB (added by slavazanko, 16 years ago) |
---|
-
fish.c
old new static int 214 214 fish_open_archive_int (struct vfs_class *me, struct vfs_s_super *super) 215 215 { 216 216 { 217 const char *argv[10]; 217 char gbuf[10]; 218 const char *argv[10]; /* All of 10 is used now */ 218 219 const char *xsh = (SUP.flags == FISH_FLAG_RSH ? "rsh" : "ssh"); 219 220 int i = 0; 220 221 … … fish_open_archive_int (struct vfs_class 224 225 #endif 225 226 if (SUP.flags == FISH_FLAG_COMPRESSED) 226 227 argv[i++] = "-C"; 228 if (SUP.flags > FISH_FLAG_RSH) { 229 argv[i++] = "-p"; 230 g_snprintf (gbuf, sizeof (gbuf), "%d", SUP.flags); 231 argv[i++] = gbuf; 232 } 227 233 argv[i++] = "-l"; 228 234 argv[i++] = SUP.user; 229 235 argv[i++] = SUP.host; … … fish_open_archive (struct vfs_class *me, 323 329 SUP.user = user; 324 330 SUP.flags = flags; 325 331 if (!strncmp (op, "rsh:", 4)) 326 SUP.flags |= FISH_FLAG_RSH;332 SUP.flags = FISH_FLAG_RSH; 327 333 SUP.cwdir = NULL; 328 334 if (password) 329 335 SUP.password = password; … … static void 913 919 fish_fill_names (struct vfs_class *me, fill_names_f func) 914 920 { 915 921 struct vfs_s_super *super = MEDATA->supers; 916 const char *flags;917 922 char *name; 918 923 char gbuf[10]; 924 919 925 while (super){ 920 switch (SUP.flags & (FISH_FLAG_RSH | FISH_FLAG_COMPRESSED)) { 926 const char *flags = ""; 927 switch (SUP.flags) { 921 928 case FISH_FLAG_RSH: 922 929 flags = ":r"; 923 930 break; 924 931 case FISH_FLAG_COMPRESSED: 925 932 flags = ":C"; 926 933 break; 927 case FISH_FLAG_RSH | FISH_FLAG_COMPRESSED:928 flags = "";929 break;930 934 default: 931 flags = ""; 935 if (SUP.flags > FISH_FLAG_RSH) { 936 g_snprintf (gbuf, sizeof (gbuf), ":%d", SUP.flags); 937 flags = gbuf; 938 } 932 939 break; 933 940 } 934 941