Skip to content

Commit

Permalink
fix: join paths correctly on windows #21
Browse files Browse the repository at this point in the history
  • Loading branch information
vknabel committed Apr 13, 2023
1 parent c74557c commit a14ead5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 1.6.3

- fix: join paths correctly on windows #21

# 1.6.2

- fix: re-release

# 1.6.1

- fix: improved error message when swiftformat is missing
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "git",
"url": "https://github.com/vknabel/vscode-swiftformat"
},
"version": "1.6.1",
"version": "1.6.3",
"license": "MIT",
"author": {
"name": "Valentin Knabel",
Expand Down
4 changes: 2 additions & 2 deletions src/Current.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import * as vscode from "vscode";
import { url } from "./UrlLiteral";
import { absolutePath } from "./AbsolutePath";
import { existsSync } from "fs";
import { join } from "path";
import * as paths from "path";

export function prodEnvironment(): Current {
return {
Expand Down Expand Up @@ -84,7 +84,7 @@ export function prodEnvironment(): Current {
if (workspace == null) {
continue;
}
const fullPath = join(workspace.uri.fsPath, path);
const fullPath = paths.resolve(workspace.uri.fsPath, path);

if (existsSync(fullPath)) {
return [absolutePath(fullPath)];
Expand Down

0 comments on commit a14ead5

Please sign in to comment.