FTP可以上传文件
This commit is contained in:
@@ -11,17 +11,17 @@
|
||||
|
||||
/*
|
||||
* FatFS 在 FF_USE_LFN=0 时不接受 "/" 前缀路径。
|
||||
* 剥离前导 "/" 后用 FatFS 兼容路径,根目录用 "." 替代空字符串。
|
||||
* 剥离前导 "/" 后用 FatFS 兼容路径,根目录用 "0:"(驱动号格式)替代。
|
||||
*/
|
||||
static const char *to_fatfs_path(const char *path)
|
||||
{
|
||||
if (path == NULL || *path == '\0') {
|
||||
return ".";
|
||||
return "0:";
|
||||
}
|
||||
if (*path == '/') {
|
||||
path++;
|
||||
if (*path == '\0') {
|
||||
return ".";
|
||||
return "0:";
|
||||
}
|
||||
}
|
||||
return path;
|
||||
|
||||
Reference in New Issue
Block a user