8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd088da commit aa9f3fbCopy full SHA for aa9f3fb
arduino-ide-extension/src/browser/contributions/save-as-sketch.ts
@@ -77,15 +77,11 @@ export class SaveAsSketch extends SketchContribution {
77
const exists = await this.fileService.exists(
78
sketchDirUri.resolve(sketch.name)
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);
+ const defaultUri = sketchDirUri.resolve(
+ exists
+ ? `${sketch.name}_copy_${dateFormat(new Date(), 'yyyymmddHHMMss')}`
+ : sketch.name
+ );
89
const defaultPath = await this.fileService.fsPath(defaultUri);
90
const { filePath, canceled } = await remote.dialog.showSaveDialog({
91
title: nls.localize(
0 commit comments