Skip to content

Commit

Permalink
fix: Use path.posix to handle uri related paths (#1598)
Browse files Browse the repository at this point in the history
  • Loading branch information
azuo committed Jun 19, 2023
1 parent e3a906d commit 1ea1b26
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/commands/log.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as path from "path";
import { posix as path } from "path";
import { commands, Uri, window } from "vscode";
import { SvnUriAction } from "../common/types";
import { Repository } from "../repository";
Expand Down
6 changes: 3 additions & 3 deletions src/commands/openHeadFile.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as path from "path";
import { posix as path } from "path";
import { commands, Uri, window } from "vscode";
import { Resource } from "../resource";
import IncomingChangeNode from "../treeView/nodes/incomingChangeNode";
Expand Down Expand Up @@ -28,15 +28,15 @@ export class OpenHeadFile extends Command {

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

const basename = path.basename(resource.resourceUri.fsPath);
const basename = path.basename(resource.resourceUri.path);
if (!HEAD) {
window.showWarningMessage(
`"HEAD version of '${basename}' is not available."`
);
return;
}

const basedir = path.dirname(resource.resourceUri.fsPath);
const basedir = path.dirname(resource.resourceUri.path);

const uri = HEAD.with({
path: path.join(basedir, `(HEAD) ${basename}`) // change document title
Expand Down
2 changes: 1 addition & 1 deletion src/commands/search_log_by_revision.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as path from "path";
import { posix as path } from "path";
import { Command } from "./command";
import { window, Uri, commands } from "vscode";
import { Repository } from "../repository";
Expand Down

0 comments on commit 1ea1b26

Please sign in to comment.