mirror of
https://gitee.com/openharmony/filemanagement_user_file_service
synced 2024-11-23 15:29:42 +00:00
回收站恢复无后缀文件出错
issue: https://gitee.com/openharmony/filemanagement_user_file_service/issues/I94HCZ Signed-off-by: hunili <lihucheng2@huawei.com>
This commit is contained in:
parent
b0ec8c8641
commit
24b614f52e
@ -270,7 +270,7 @@ static int MoveFile(const string &srcFile, const string &destFile)
|
||||
size_t suffixPos = destFile.find_last_of('.');
|
||||
string filePathName = " ";
|
||||
string fileSuffix = "";
|
||||
if (suffixPos < slashPos) {
|
||||
if (suffixPos == std::string::npos || suffixPos < slashPos) {
|
||||
// 识别的文件后缀分隔符必须在文件部分
|
||||
filePathName = destFile + filePathName;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user