From 17f2adb2db2da81ec7617bba88e9ed465a9a4bad Mon Sep 17 00:00:00 2001 From: Jonathan Jogenfors Date: Tue, 2 Apr 2024 00:43:24 +0200 Subject: [PATCH] fix loop bug --- server/src/services/library.service.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/server/src/services/library.service.ts b/server/src/services/library.service.ts index 79ce188a7..a8c5affb8 100644 --- a/server/src/services/library.service.ts +++ b/server/src/services/library.service.ts @@ -631,11 +631,16 @@ export class LibraryService extends EventEmitter { this.logger.log(`Refreshing library: ${job.id}`); const validImportPaths: string[] = []; + console.warn('importPaths', library.importPaths); + console.warn('importPaths', library.importPaths[0]); + + for (const importPath of library.importPaths) { + console.warn('importPath', importPath); - for (const importPath in library.importPaths) { const validation = await this.validateImportPath(importPath); if (validation.isValid) { - validImportPaths.push(path.normalize(validation.importPath)); + validImportPaths.push(path.normalize(importPath)); + console.warn('validImportPaths', importPath); } else { this.logger.error(`Skipping invalid import path: ${importPath}. Reason: ${validation.message}`); }