Skip to content

Commit 1ea1b26

Browse files
authored
fix: Use path.posix to handle uri related paths (#1598)
1 parent e3a906d commit 1ea1b26

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/commands/log.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as path from "path";
1+
import { posix as path } from "path";
22
import { commands, Uri, window } from "vscode";
33
import { SvnUriAction } from "../common/types";
44
import { Repository } from "../repository";

src/commands/openHeadFile.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as path from "path";
1+
import { posix as path } from "path";
22
import { commands, Uri, window } from "vscode";
33
import { Resource } from "../resource";
44
import IncomingChangeNode from "../treeView/nodes/incomingChangeNode";
@@ -28,15 +28,15 @@ export class OpenHeadFile extends Command {
2828

2929
const HEAD = await this.getLeftResource(resource, "HEAD");
3030

31-
const basename = path.basename(resource.resourceUri.fsPath);
31+
const basename = path.basename(resource.resourceUri.path);
3232
if (!HEAD) {
3333
window.showWarningMessage(
3434
`"HEAD version of '${basename}' is not available."`
3535
);
3636
return;
3737
}
3838

39-
const basedir = path.dirname(resource.resourceUri.fsPath);
39+
const basedir = path.dirname(resource.resourceUri.path);
4040

4141
const uri = HEAD.with({
4242
path: path.join(basedir, `(HEAD) ${basename}`) // change document title

src/commands/search_log_by_revision.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as path from "path";
1+
import { posix as path } from "path";
22
import { Command } from "./command";
33
import { window, Uri, commands } from "vscode";
44
import { Repository } from "../repository";

0 commit comments

Comments
 (0)