From 1ea1b26e14cdfeea941ece35004aa659c80c9a2e Mon Sep 17 00:00:00 2001 From: Azuo Lee Date: Tue, 20 Jun 2023 02:54:59 +0800 Subject: [PATCH 1/2] fix: Use path.posix to handle uri related paths (#1598) --- src/commands/log.ts | 2 +- src/commands/openHeadFile.ts | 6 +++--- src/commands/search_log_by_revision.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/commands/log.ts b/src/commands/log.ts index 540e9f8fb..6b4b4650a 100644 --- a/src/commands/log.ts +++ b/src/commands/log.ts @@ -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"; diff --git a/src/commands/openHeadFile.ts b/src/commands/openHeadFile.ts index 9f5d4b976..456acb151 100644 --- a/src/commands/openHeadFile.ts +++ b/src/commands/openHeadFile.ts @@ -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"; @@ -28,7 +28,7 @@ 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."` @@ -36,7 +36,7 @@ export class OpenHeadFile extends Command { 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 diff --git a/src/commands/search_log_by_revision.ts b/src/commands/search_log_by_revision.ts index fddd32448..e59b928c9 100644 --- a/src/commands/search_log_by_revision.ts +++ b/src/commands/search_log_by_revision.ts @@ -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"; From 00eabfe2de4a51fc19313c71167252ad21fa5cf3 Mon Sep 17 00:00:00 2001 From: Chris Johnston Date: Mon, 19 Jun 2023 18:56:39 +0000 Subject: [PATCH 2/2] chore(release): 2.16.1 [skip ci] ## [2.16.1](https://github.com/JohnstonCode/svn-scm/compare/v2.16.0...v2.16.1) (2023-06-19) ### Bug Fixes * Use path.posix to handle uri related paths ([#1598](https://github.com/JohnstonCode/svn-scm/issues/1598)) ([1ea1b26](https://github.com/JohnstonCode/svn-scm/commit/1ea1b26e14cdfeea941ece35004aa659c80c9a2e)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ae98f138..fc250530a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [2.16.1](https://github.com/JohnstonCode/svn-scm/compare/v2.16.0...v2.16.1) (2023-06-19) + + +### Bug Fixes + +* Use path.posix to handle uri related paths ([#1598](https://github.com/JohnstonCode/svn-scm/issues/1598)) ([1ea1b26](https://github.com/JohnstonCode/svn-scm/commit/1ea1b26e14cdfeea941ece35004aa659c80c9a2e)) + # [2.16.0](https://github.com/JohnstonCode/svn-scm/compare/v2.15.7...v2.16.0) (2023-06-19) diff --git a/package.json b/package.json index e879cdd2f..406fc0d28 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "svn-scm", "displayName": "SVN", "description": "Integrated Subversion source control", - "version": "2.16.0", + "version": "2.16.1", "publisher": "johnstoncode", "engines": { "vscode": "^1.44.0"