mirror of https://github.com/MidnightCommander/mc
1999-08-18 Norbert Warmuth <nwarmuth@privat.circular.de>
* vfs/direntry.c (vfs_s_getlocalcopy): There's an aditional strdup needed. In rare cases a pointer was freed twice. Pavel Machek pointed this out a while ago but obviously it hasn't been fixed, yet. * vfs/sfs.c (vfmake): Quote characters with a special meaning to the shell in filenames/-pathes (Fix Bug #1931, VFS will not work if your full path has the space character in it.).
This commit is contained in:
parent
3cf5946891
commit
d988df6100
|
@ -1,3 +1,13 @@
|
|||
1999-08-18 Norbert Warmuth <nwarmuth@privat.circular.de>
|
||||
|
||||
* direntry.c (vfs_s_getlocalcopy): There's an aditional strdup
|
||||
needed. In rare cases a pointer was freed twice. Pavel Machek
|
||||
pointed this out a while ago but obviously it hasn't been fixed yet.
|
||||
|
||||
* sfs.c (vfmake): Quote characters with a special meaning to the
|
||||
shell in filenames/-pathes (Fix Bug #1931, VFS will not work if
|
||||
your full path has the space character in it.).
|
||||
|
||||
1999-08-17 Kjartan Maraas <kmaraas@online.no>
|
||||
|
||||
* fish.c: Fix typo.
|
||||
|
|
|
@ -962,7 +962,7 @@ vfs_s_getlocalcopy (vfs *me, char *path)
|
|||
if (!ino->localname)
|
||||
ino->localname = mc_def_getlocalcopy (me, buf);
|
||||
/* FIXME: fd_usage++ missing */
|
||||
return ino->localname;
|
||||
return g_strdup (ino->localname);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
14
vfs/sfs.c
14
vfs/sfs.c
|
@ -65,12 +65,14 @@ static int vfmake (vfs *me, char *name, char *cache)
|
|||
|
||||
if ((sfs_flags[w] & F_1) || (!strcmp (name, "/"))) ; else return -1;
|
||||
/* if ((sfs_flags[w] & F_2) || (!inpath) || (!*inpath)); else return -1; */
|
||||
if (!(sfs_flags[w] & F_NOLOCALCOPY))
|
||||
name = mc_getlocalcopy (name);
|
||||
else
|
||||
name = g_strdup (name);
|
||||
if (!name)
|
||||
return -1;
|
||||
if (!(sfs_flags[w] & F_NOLOCALCOPY)) {
|
||||
s = mc_getlocalcopy (name);
|
||||
if (!s)
|
||||
return -1;
|
||||
name = name_quote (s, 0);
|
||||
g_free (s);
|
||||
} else
|
||||
name = name_quote (name, 0);
|
||||
s = sfs_command[w];
|
||||
#define COPY_CHAR if (t-pad>10200) return -1; else *t++ = *s;
|
||||
#define COPY_STRING(a) if ((t-pad)+strlen(a)>10200) return -1; else { strcpy (t, a); t+= strlen(a); }
|
||||
|
|
Loading…
Reference in New Issue