diff --git a/deno/ddln_server.ts b/deno/ddln_server.ts index 25dc1e6..2a7738b 100644 --- a/deno/ddln_server.ts +++ b/deno/ddln_server.ts @@ -293,12 +293,11 @@ function connectWebsocket(request: Request) { } async function devServerWatchFiles() { - const parentDir = Deno.cwd().replace(/\/[^/]+$/, ''); const watcher = Deno.watchFs(["../static/", "../src/"]); for await (const event of watcher) { if (event.kind === "modify") { for (const path of event.paths) { - const cachedPath = path.replace(parentDir, ''); + const cachedPath = path.replace(Deno.cwd() + '/..', '') filepathResponseCache.delete(cachedPath); console.log('Purging updated file:', cachedPath) }