From e46f9cefb73361b9cd4623185cf879dedcc6b51d Mon Sep 17 00:00:00 2001 From: Andy Burke Date: Thu, 6 Nov 2025 19:32:26 -0800 Subject: [PATCH] fix: add some debugging --- deno.json | 2 +- indexers/symlinks.ts | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/deno.json b/deno.json index f06a8e9..8073d60 100644 --- a/deno.json +++ b/deno.json @@ -1,6 +1,6 @@ { "name": "@andyburke/fsdb", - "version": "1.2.0", + "version": "1.2.1", "license": "MIT", "exports": { ".": "./fsdb.ts", diff --git a/indexers/symlinks.ts b/indexers/symlinks.ts index bed90bd..7c875b4 100644 --- a/indexers/symlinks.ts +++ b/indexers/symlinks.ts @@ -100,6 +100,15 @@ export class FSDB_INDEXER_SYMLINKS implements FSDB_INDEXER { const offset = options?.offset ?? 0; let counter = 0; + if (Deno.env.get('FSDB_DEBUG')) { + console.dir({ + config: this.config, + organized_paths, + limit, + offset + }); + } + const glob_pattern = path.resolve(path.join(this.config.root, ...organized_paths)); for await (const item_file of fs.expandGlob(glob_pattern)) { const file_info: Deno.FileInfo = await Deno.lstat(item_file.path); @@ -110,7 +119,16 @@ export class FSDB_INDEXER_SYMLINKS implements FSDB_INDEXER { } const resolved_item_path = await Deno.readLink(item_file.path); - results.push(path.normalize(path.resolve(path.dirname(item_file.path), resolved_item_path))); + const normalized_path = path.normalize(path.resolve(path.dirname(item_file.path), resolved_item_path)); + + if (Deno.env.get('FSDB_DEBUG')) { + console.dir({ + resolved_item_path, + normalized_path + }); + } + + results.push(normalized_path); ++counter; }