mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-10 02:48:33 +00:00
fix: copy example with .pde main sketch file
Closes arduino/arduino-ide#2377 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
@@ -609,9 +609,13 @@ export class SketchesServiceImpl
|
||||
force: true,
|
||||
});
|
||||
|
||||
const sourceMainSketchFilePath = FileUri.fsPath(sketch.mainFileUri);
|
||||
// Can copy sketch with pde main sketch file: https://github.com/arduino/arduino-ide/issues/2377
|
||||
const ext = path.extname(sourceMainSketchFilePath);
|
||||
|
||||
// rename the main sketch file
|
||||
await fs.rename(
|
||||
join(temp, `${sourceFolderBasename}.ino`),
|
||||
join(temp, `${sourceFolderBasename}${ext}`),
|
||||
join(temp, `${destinationFolderBasename}.ino`)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user