diff --git a/ui/mainwindow.cpp b/ui/mainwindow.cpp index 97b0722..f4ee014 100644 --- a/ui/mainwindow.cpp +++ b/ui/mainwindow.cpp @@ -877,6 +877,7 @@ void MainWindow::setLocalPathList(const QStringList &list) qInfo() << "peony menu send: not current connect"; return; } + m_isDusUpload = true; if (m_connectInfo.deviceType == ConnectionService::DeviceType::ANDROID) { slotUploadFile("/Download", list); } else if (m_connectInfo.deviceType == ConnectionService::DeviceType::PC) { @@ -1628,19 +1629,25 @@ void MainWindow::slotUploadFile(QString dirName, const QStringList &localPathLis { // 上传文件埋点 GenerateTools::buriedPoint(kabase::BuriedPoint::PT::KylinMobileAssistantUploadFile); - QStringList pathList = m_fileManageWin->getPathList(); - pathList.removeAll(m_fileManageWin->crumbText(FileManageWin::CrumbTag::Storage)); - pathList.removeAll(m_fileManageWin->crumbText(FileManageWin::CrumbTag::FileList)); - pathList.removeAll(m_connectInfo.deviceName); - m_uploadPath = "/"; - m_uploadPath.append(pathList.join("/")); - if (!dirName.isEmpty()) { - if (m_uploadPath == "/") { - m_uploadPath.append(dirName); - } else { - m_uploadPath.append("/" + dirName); - } + if (m_isDusUpload) { + m_isDusUpload = false; + m_uploadPath = dirName; m_fileManageWin->load(); + } else { + QStringList pathList = m_fileManageWin->getPathList(); + pathList.removeAll(m_fileManageWin->crumbText(FileManageWin::CrumbTag::Storage)); + pathList.removeAll(m_fileManageWin->crumbText(FileManageWin::CrumbTag::FileList)); + pathList.removeAll(m_connectInfo.deviceName); + m_uploadPath = "/"; + m_uploadPath.append(pathList.join("/")); + if (!dirName.isEmpty()) { + if (m_uploadPath == "/") { + m_uploadPath.append(dirName); + } else { + m_uploadPath.append("/" + dirName); + } + m_fileManageWin->load(); + } } m_ftpClient->setTransferMode(QFtp::Passive); m_ftpClient->uploadAllFiles(localPathList, m_uploadPath); diff --git a/ui/mainwindow.h b/ui/mainwindow.h index 4e6b6f0..eb0777e 100644 --- a/ui/mainwindow.h +++ b/ui/mainwindow.h @@ -267,6 +267,7 @@ private: QString m_tipMesseage = ""; // 提示消息 PublicAttributes::Theme m_theme = PublicAttributes::Theme::Light; // 主题 bool m_isDownloadingThumbanil = false; + bool m_isDusUpload = false; }; #endif // MAINWINDOW_H