From 1685f4ed28f2509f3f00a5b1572d33619bd2e479 Mon Sep 17 00:00:00 2001 From: "Patrik J. Braun" Date: Tue, 10 Dec 2019 11:25:26 +0100 Subject: [PATCH] improving absolute path checking --- src/backend/ProjectPath.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/backend/ProjectPath.ts b/src/backend/ProjectPath.ts index e6a74210..2c7ee3b6 100644 --- a/src/backend/ProjectPath.ts +++ b/src/backend/ProjectPath.ts @@ -13,16 +13,12 @@ class ProjectPathClass { this.reset(); } - isAbsolutePath(pathStr: string) { - return path.resolve(pathStr) === path.normalize(pathStr); - } - normalizeRelative(pathStr: string) { return path.join(pathStr, path.sep); } getAbsolutePath(pathStr: string): string { - return this.isAbsolutePath(pathStr) ? pathStr : path.join(this.Root, pathStr); + return path.isAbsolute(pathStr) ? pathStr : path.join(this.Root, pathStr); } getRelativePathToImages(pathStr: string): string {