From 810c5d6a8add2b0be022ea1ddd817ef3b9cc527c Mon Sep 17 00:00:00 2001 From: Gustavo Rodrigues Date: Thu, 12 Sep 2024 19:25:11 -0300 Subject: [PATCH] Use resolve instead of join Fixes #2. --- src/dhash.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dhash.ts b/src/dhash.ts index a42afa6..092b61c 100644 --- a/src/dhash.ts +++ b/src/dhash.ts @@ -3,13 +3,13 @@ import { GIF, Image, } from "https://deno.land/x/imagescript@v1.2.14/mod.ts"; -import { normalize, join } from "https://deno.land/std@0.153.0/path/mod.ts"; +import { normalize, resolve } from "https://deno.land/std@0.153.0/path/mod.ts"; export const dhash = async (pathOrSrc: string | Uint8Array) => { let file = pathOrSrc; if (typeof pathOrSrc === "string") { - const resolvedPath = join(Deno.cwd(), normalize(pathOrSrc)); + const resolvedPath = resolve(Deno.cwd(), normalize(pathOrSrc)); try { file = await Deno.readFile(resolvedPath);