forked from Cutlery/immich
fix loop bug
This commit is contained in:
parent
ee0fedf061
commit
17f2adb2db
@ -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}`);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user