Skip to content

Commit

Permalink
fix:Copying a multi-layered directory with a long path to the mobile …
Browse files Browse the repository at this point in the history
…MTP, an error pops up

Do special treatment

Log:Copying a multi-layered directory with a long path to the mobile MTP, an error pops up
Bug:https://pms.uniontech.com/bug-view-236225.html
  • Loading branch information
liyigang1 committed Dec 27, 2023
1 parent f391947 commit f1455fa
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -642,10 +642,15 @@ bool FileOperateBaseWorker::checkAndCopyDir(const FileInfoPointer &fromInfo, con
action = AbstractJobHandler::SupportAction::kNoAction;
if (localFileHandler->mkdir(toInfo->urlOf(UrlInfoType::kUrl)))
break;
// 特殊处理
auto errstr = localFileHandler->errorString();
if (localFileHandler->errorCode() == DFMIOErrorCode::DFM_IO_ERROR_FAILED
&& toInfo->pathOf(PathInfoType::kAbsoluteFilePath).toLocal8Bit().size() > 255)
errstr = tr("The file name or the path is too long!");

action = doHandleErrorAndWait(fromInfo->urlOf(UrlInfoType::kUrl), toInfo->urlOf(UrlInfoType::kUrl),
AbstractJobHandler::JobErrorType::kMkdirError, true,
localFileHandler->errorString());
errstr);
} while (!isStopped() && action == AbstractJobHandler::SupportAction::kRetryAction);

checkRetry();
Expand Down

0 comments on commit f1455fa

Please sign in to comment.