Skip to content

Commit 80643b5

Browse files
committed
Refactor path handling to use basename for new sketch creation
1 parent 6db4c15 commit 80643b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/src/setupCommands.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { dirname, join } from 'path';
1+
import { basename, dirname, join } from 'path';
22
import { ExtensionContext, commands, Uri, window, workspace } from 'vscode';
33
import { state } from './extension';
44

@@ -75,7 +75,7 @@ export function setupCommands(context: ExtensionContext) {
7575
return;
7676
}
7777
if (isReadOnly) {
78-
const path = join(context.globalStorageUri.fsPath, `processing-sketch-${new Date().getTime()}`, dirname(folder));
78+
const path = join(context.globalStorageUri.fsPath, `processing-sketch-${new Date().getTime()}`, basename(folder));
7979
try {
8080
await workspace.fs.copy(Uri.file(folder), Uri.file(path), { overwrite: true });
8181
folder = path;

0 commit comments

Comments
 (0)