file-browser-dialog.cpp (seafile-client-9.0.2) | : | file-browser-dialog.cpp (seafile-client-9.0.2-1) | ||
---|---|---|---|---|
skipping to change at line 684 | skipping to change at line 684 | |||
} | } | |||
} | } | |||
FileDownloadTask *task = data_mgr_->createSaveAsTask(repo_.id, ::pathJoi n(current_path_, dirent.name), local_path); | FileDownloadTask *task = data_mgr_->createSaveAsTask(repo_.id, ::pathJoi n(current_path_, dirent.name), local_path); | |||
connect(task, SIGNAL(finished(bool)), this, SLOT(onDownloadFinished(bool ))); | connect(task, SIGNAL(finished(bool)), this, SLOT(onDownloadFinished(bool ))); | |||
return; | return; | |||
} | } | |||
QString local_dir = QFileDialog::getExistingDirectory(this, tr("Enter the pa th of the folder you want to save to..."), download_dir.path()); | QString local_dir = QFileDialog::getExistingDirectory(this, tr("Enter the pa th of the folder you want to save to..."), download_dir.path()); | |||
if (local_dir.isEmpty()) | if (local_dir.isEmpty()) | |||
return; | return; | |||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 13, 0)) | ||||
download_dir.setPath(local_dir); | download_dir.setPath(local_dir); | |||
#else | ||||
download_dir = local_dir; | ||||
#endif | ||||
// | // | |||
// scan for existing files and folders | // scan for existing files and folders | |||
// then begin downloading | // then begin downloading | |||
// | // | |||
Q_FOREACH(const SeafDirent* dirent, dirents) { | Q_FOREACH(const SeafDirent* dirent, dirents) { | |||
QString local_path = ::pathJoin(local_dir, dirent->name); | QString local_path = ::pathJoin(local_dir, dirent->name); | |||
if (QFileInfo(local_path).exists()) { | if (QFileInfo(local_path).exists()) { | |||
if (!seafApplet->yesOrNoBox(tr("Do you want to overwrite the exist ing file \"%1\"?").arg(dirent->name))) { | if (!seafApplet->yesOrNoBox(tr("Do you want to overwrite the exist ing file \"%1\"?").arg(dirent->name))) { | |||
return; | return; | |||
} | } | |||
End of changes. 2 change blocks. | ||||
4 lines changed or deleted | 0 lines changed or added |