Skip to content

Handle existing extraction directory instead of failing silently#11

Merged
borislav-angelov merged 2 commits intomasterfrom
fix-extract-dir-already-exists
Mar 27, 2026
Merged

Handle existing extraction directory instead of failing silently#11
borislav-angelov merged 2 commits intomasterfrom
fix-extract-dir-already-exists

Conversation

@developeritsme
Copy link
Copy Markdown
Contributor

When the target extraction directory already exists, QDir::mkdir() returns false and shows a misleading "Fix permissions" error.

Now shows a dialog with three options:

  • Wipe & Extract: removes existing directory and proceeds
  • Create New Folder: appends (1), (2), etc. to find an available name
  • Cancel: aborts extraction

When the target extraction directory already exists, QDir::mkdir()
returns false and shows a misleading "Fix permissions" error.

Now shows a dialog with three options:
- Wipe & Extract: removes existing directory and proceeds
- Create New Folder: appends (1), (2), etc. to find an available name
- Cancel: aborts extraction
… directory suffix to 100

Assign QFileDialog result to a local variable before checking for cancel,
so backupFilename is preserved when the user cancels the open dialog after
a drag-and-drop. Also cap the "Create New Folder" suffix loop at 100.
@borislav-angelov borislav-angelov merged commit a731133 into master Mar 27, 2026
@borislav-angelov borislav-angelov deleted the fix-extract-dir-already-exists branch March 27, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants