Skip to content

Commit

Permalink
tell user what folders will be removed
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu Gallien <[email protected]>
  • Loading branch information
mgallien committed Sep 3, 2024
1 parent c780e07 commit 5e780b9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/gui/folder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1670,9 +1670,14 @@ void Folder::slotNeedToRemoveRemnantsReadOnlyFolders(const QList<SyncFileItemPtr
const QString &localPath,
std::function<void (bool)> callback)
{
const auto msg = tr("Do you want to clean up remnant read-only folders left over from previous failed synchronization attempts.");
auto listOfFolders = QStringList{};
for (const auto &oneFolder : folders) {
listOfFolders.push_back(oneFolder->_file);
}

const auto msg = tr("Do you want to clean up remnant read-only folders left over from previous failed synchronization attempts.\n%1");
auto msgBox = new QMessageBox(QMessageBox::Question, tr("Remove remnant invalid folders?"),
msg, QMessageBox::NoButton);
msg.arg(listOfFolders.join("\n")), QMessageBox::NoButton);
msgBox->setAttribute(Qt::WA_DeleteOnClose);
msgBox->setWindowFlags(msgBox->windowFlags() | Qt::WindowStaysOnTopHint);
msgBox->addButton(tr("Proceed to remove remnant folders"), QMessageBox::AcceptRole);
Expand Down

0 comments on commit 5e780b9

Please sign in to comment.