@@ -52,7 +52,6 @@ export class RemoteFileDialog {
5252 private remoteAuthority : string | undefined ;
5353 private requiresTrailing : boolean ;
5454 private scheme : string = REMOTE_HOST_SCHEME ;
55- private shouldOverwriteFile : boolean = false ;
5655 private contextKey : IContextKey < boolean > ;
5756 private userEnteredPathSegment : string ;
5857 private autoCompletePathSegment : string ;
@@ -267,7 +266,6 @@ export class RemoteFileDialog {
267266 // If the user has just entered more bad path, don't change anything
268267 if ( value !== this . constructFullUserPath ( ) && ! this . isBadSubpath ( value ) ) {
269268 this . filePickBox . validationMessage = undefined ;
270- this . shouldOverwriteFile = false ;
271269 const valueUri = this . remoteUriFrom ( this . trimTrailingSlash ( this . filePickBox . value ) ) ;
272270 let updated : UpdateResult = UpdateResult . NotUpdated ;
273271 if ( ! resources . isEqual ( this . remoteUriFrom ( this . trimTrailingSlash ( this . pathFromUri ( this . currentFolder ) ) ) , valueUri , true ) ) {
@@ -552,9 +550,8 @@ export class RemoteFileDialog {
552550 // Can't do this
553551 this . filePickBox . validationMessage = nls . localize ( 'remoteFileDialog.validateFolder' , 'The folder already exists. Please use a new file name.' ) ;
554552 return Promise . resolve ( false ) ;
555- } else if ( stat && ! this . shouldOverwriteFile ) {
553+ } else if ( stat ) {
556554 // Replacing a file.
557- this . shouldOverwriteFile = true ;
558555 // Show a yes/no prompt
559556 const message = nls . localize ( 'remoteFileDialog.validateExisting' , '{0} already exists. Are you sure you want to overwrite it?' , resources . basename ( uri ) ) ;
560557 return this . yesNoPrompt ( message ) ;
0 commit comments