mirror of
https://github.com/ksherlock/gopher.git
synced 2024-05-28 00:48:28 +00:00
include leading / with directory
This commit is contained in:
parent
d2642a63d5
commit
55610990e1
7
smb.c
7
smb.c
|
@ -1175,9 +1175,16 @@ static uint16_t *file_path(const char *url, const URLComponents *components)
|
|||
{
|
||||
unsigned index;
|
||||
|
||||
#if 0
|
||||
path.location = i + 1;
|
||||
path.length = l - 1;
|
||||
if (!path.length) return NULL;
|
||||
#else
|
||||
// include leading /
|
||||
path.location = i;
|
||||
path.length = l;
|
||||
if (path.length <= 1) return NULL;
|
||||
#endif
|
||||
|
||||
rv = malloc(path.length * 2 + 4);
|
||||
if (!rv) return NULL;
|
||||
|
|
Loading…
Reference in New Issue
Block a user