Skip to content

Commit fb7eaf7

Browse files
committed
🐛 fix path inside DOSbox
1 parent eaca9fa commit fb7eaf7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/emulators/dosbox.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,17 @@ export class Dosbox implements ExecAction {
6666
}
6767

6868
const logUri = Utils.joinPath(ctx.assemblyToolsFolder, ctx.logFileName);
69-
const file = path.relative(
69+
70+
const rel = path.relative(
7071
workspaceFolder.fsPath,
7172
ctx.mountMode === conf.MountMode.single ? ctx.fileCopyUri.fsPath : ctx.fileUri.fsPath,
7273
);
73-
const fileinfo = path.parse(file);
74+
const fileInDosbox = path.win32.resolve("D:\\", rel);
75+
const fileinfo = path.parse(fileInDosbox);
7476
function cb(val: string) {
7577
const r = val
76-
.replace("${file}", file)
77-
.replace("${filename}", file.replace(fileinfo.ext, ""));
78+
.replace("${file}", fileInDosbox)
79+
.replace("${filename}", fileInDosbox.replace(fileinfo.ext, ""));
7880
if (val.startsWith('>')) {
7981
return r.replace(">", "");
8082
}

0 commit comments

Comments
 (0)