File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
arduino-ide-extension/src/browser/contributions Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -77,15 +77,11 @@ export class SaveAsSketch extends SketchContribution {
77
77
const exists = await this . fileService . exists (
78
78
sketchDirUri . resolve ( sketch . name )
79
79
) ;
80
- const defaultUri = exists
81
- ? sketchDirUri . resolve (
82
- sketchDirUri
83
- . resolve (
84
- `${ sketch . name } _copy_${ dateFormat ( new Date ( ) , 'yyyymmddHHMMss' ) } `
85
- )
86
- . toString ( )
87
- )
88
- : sketchDirUri . resolve ( sketch . name ) ;
80
+ const defaultUri = sketchDirUri . resolve (
81
+ exists
82
+ ? `${ sketch . name } _copy_${ dateFormat ( new Date ( ) , 'yyyymmddHHMMss' ) } `
83
+ : sketch . name
84
+ ) ;
89
85
const defaultPath = await this . fileService . fsPath ( defaultUri ) ;
90
86
const { filePath, canceled } = await remote . dialog . showSaveDialog ( {
91
87
title : nls . localize (
You can’t perform that action at this time.
0 commit comments