Skip to content
Snippets Groups Projects
Commit 15906e19 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

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
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #2418 passed
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment