mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-24 04:09:15 +01:00
-made two small corrections in the ftp directory handling
This commit is contained in:
parent
8057a883b6
commit
2f0cb86073
@ -66,9 +66,14 @@ static bool change_real_dir(void)
|
|||||||
if(check_device() == true)
|
if(check_device() == true)
|
||||||
{
|
{
|
||||||
strncpy(real_path, fmt("%s:/%s", DeviceName[cur_part], strchr((main_path+1), '/')+1), MAXPATHLEN);
|
strncpy(real_path, fmt("%s:/%s", DeviceName[cur_part], strchr((main_path+1), '/')+1), MAXPATHLEN);
|
||||||
|
if(!fsop_FolderExist(real_path))
|
||||||
|
{
|
||||||
|
errno = ENOTDIR;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
errno = ENOTDIR;
|
errno = ENODEV;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,11 +227,8 @@ static s32 ftp_MKD(client_t *client, char *path) {
|
|||||||
}
|
}
|
||||||
if (ftp_makedir(path) == 0) {
|
if (ftp_makedir(path) == 0) {
|
||||||
char msg[MAXPATHLEN + 21];
|
char msg[MAXPATHLEN + 21];
|
||||||
char abspath[MAXPATHLEN];
|
|
||||||
strcpy(abspath, client->cwd);
|
|
||||||
//vrt_chdir(abspath, path); // TODO: error checking
|
|
||||||
// TODO: escape double-quotes
|
// TODO: escape double-quotes
|
||||||
strncpy(msg, fmt("\"%s\" directory created.", abspath), MAXPATHLEN + 21);
|
strncpy(msg, fmt("\"%s\" directory created.", path), MAXPATHLEN + 21);
|
||||||
return write_reply(client, 257, msg);
|
return write_reply(client, 257, msg);
|
||||||
} else {
|
} else {
|
||||||
return write_reply(client, 550, strerror(errno));
|
return write_reply(client, 550, strerror(errno));
|
||||||
|
Loading…
Reference in New Issue
Block a user