Skip to content

fix: Use path.posix to handle uri related paths #1598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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