Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 15906e19 authored by Rob Swindell's avatar Rob Swindell 💬

Handle FTP requests for paths that start with "/./"

Midnight Commander (mc) apparently sends requests like this for files
(e.g. aliases) in the virtual root directory.

Fixes another part of the reported issue #288.
parent bb1ee459
Pipeline #2418 passed with stage
in 9 minutes and 21 seconds
......@@ -391,7 +391,7 @@ int getdir(char* p, user_t* user, client_t* client)
if(*p=='/')
p++;
else if(!strncmp(p,"./",2))
if(!strncmp(p,"./",2))
p+=2;
tp=strchr(p,'/');
......@@ -4118,7 +4118,7 @@ static void ctrl_thread(void* arg)
lib=-1;
p++;
}
else if(!strncmp(p,"./",2))
if(!strncmp(p,"./",2))
p+=2;
if(lib<0 && ftpalias(p, fname, &user, &client, &dir)==TRUE) {
......@@ -4497,7 +4497,7 @@ static void ctrl_thread(void* arg)
lib=-1;
p++;
}
else if(!strncmp(p,"./",2))
if(!strncmp(p,"./",2))
p+=2;
/* Need to add support for uploading to aliased directories */
if(lib<0 && (tp=strchr(p,'/'))!=NULL) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment