1
0
forked from Cutlery/immich

fix loop bug

This commit is contained in:
Jonathan Jogenfors 2024-04-02 00:43:24 +02:00
parent ee0fedf061
commit 17f2adb2db

View File

@ -631,11 +631,16 @@ export class LibraryService extends EventEmitter {
this.logger.log(`Refreshing library: ${job.id}`); this.logger.log(`Refreshing library: ${job.id}`);
const validImportPaths: string[] = []; 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); const validation = await this.validateImportPath(importPath);
if (validation.isValid) { if (validation.isValid) {
validImportPaths.push(path.normalize(validation.importPath)); validImportPaths.push(path.normalize(importPath));
console.warn('validImportPaths', importPath);
} else { } else {
this.logger.error(`Skipping invalid import path: ${importPath}. Reason: ${validation.message}`); this.logger.error(`Skipping invalid import path: ${importPath}. Reason: ${validation.message}`);
} }