mirror of
https://github.com/libfuse/libfuse.git
synced 2024-11-23 12:14:15 +08:00
fix
This commit is contained in:
parent
566611d3e3
commit
16d7c0a74e
@ -1,3 +1,8 @@
|
||||
2004-12-10 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* When mounting on a subdirectory of / don't duplicate slashes at
|
||||
the beggining of path (spotted by David Shaw)
|
||||
|
||||
2004-12-09 Miklos Szeredi <miklos@szeredi.hu>
|
||||
|
||||
* Fix bug causing garbage in mount options (spotted by David Shaw)
|
||||
|
@ -780,8 +780,13 @@ static char *resolve_path(const char *orig)
|
||||
dst = strdup(buf);
|
||||
else {
|
||||
dst = (char *) malloc(strlen(buf) + 1 + strlen(lastcomp) + 1);
|
||||
if (dst)
|
||||
sprintf(dst, "%s/%s", buf, lastcomp);
|
||||
if (dst) {
|
||||
unsigned buflen = strlen(buf);
|
||||
if (buflen && buf[buflen-1] == '/')
|
||||
sprintf(dst, "%s%s", buf, lastcomp);
|
||||
else
|
||||
sprintf(dst, "%s/%s", buf, lastcomp);
|
||||
}
|
||||
}
|
||||
free(copy);
|
||||
if (dst == NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user