File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
arduino-ide-extension/src/browser/contributions Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -74,17 +74,7 @@ export class SaveAsSketch extends CloudSketchContribution {
7474 if ( cloudUri ) {
7575 destinationUri = await this . createCloudCopy ( { cloudUri, sketch } ) ;
7676 } else {
77- const isTemp = await this . sketchesService . isTemp ( sketch ) ;
78- if ( ! isTemp ) {
79- // If the current sketch is an ordinary non-temp sketch, do not delete it after the rename.
80- // https://github.com/arduino/arduino-ide/issues/1882#issuecomment-1427524645
81- wipeOriginal = false ;
82- }
83- destinationUri = await this . createLocalCopy (
84- sketch ,
85- isTemp ,
86- execOnlyIfTemp
87- ) ;
77+ destinationUri = await this . createLocalCopy ( sketch , execOnlyIfTemp ) ;
8878 }
8979 if ( ! destinationUri ) {
9080 return false ;
@@ -129,9 +119,9 @@ export class SaveAsSketch extends CloudSketchContribution {
129119
130120 private async createLocalCopy (
131121 sketch : Sketch ,
132- isTemp ?: boolean ,
133122 execOnlyIfTemp ?: boolean
134123 ) : Promise < string | undefined > {
124+ const isTemp = await this . sketchesService . isTemp ( sketch ) ;
135125 if ( ! isTemp && ! ! execOnlyIfTemp ) {
136126 return undefined ;
137127 }
You can’t perform that action at this time.
0 commit comments