fix: add some debugging
This commit is contained in:
parent
77765e9e60
commit
e46f9cefb7
2 changed files with 20 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@andyburke/fsdb",
|
||||
"version": "1.2.0",
|
||||
"version": "1.2.1",
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": "./fsdb.ts",
|
||||
|
|
|
|||
|
|
@ -100,6 +100,15 @@ export class FSDB_INDEXER_SYMLINKS<T> implements FSDB_INDEXER<T> {
|
|||
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<T> implements FSDB_INDEXER<T> {
|
|||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue