Skip to content

Commit

Permalink
Fix simple file dialog save as when filenames overlap
Browse files Browse the repository at this point in the history
Fixes #135838
  • Loading branch information
alexr00 committed Nov 3, 2021
1 parent 7adb0ee commit 3e6039e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,11 @@ export class SimpleFileDialog {
this.activeItem = quickPickItem;
// Changing the active items will trigger the onDidActiveItemsChanged. Clear the autocomplete first, then set it after.
this.autoCompletePathSegment = '';
this.filePickBox.activeItems = [quickPickItem];
if (quickPickItem.isFolder || !this.trailing) {
this.filePickBox.activeItems = [quickPickItem];
} else {
this.filePickBox.activeItems = [];
}
return true;
} else if (force && (!equalsIgnoreCase(this.basenameWithTrailingSlash(quickPickItem.uri), (this.userEnteredPathSegment + this.autoCompletePathSegment)))) {
this.userEnteredPathSegment = '';
Expand Down

0 comments on commit 3e6039e

Please sign in to comment.