1
0
forked from Cutlery/immich

normalize import path

This commit is contained in:
Jonathan Jogenfors 2024-03-20 08:36:00 +01:00
parent 11eb7f7c3f
commit 7858cf4009

View File

@ -596,6 +596,8 @@ export class LibraryService extends EventEmitter {
let existsInImportPath = false; let existsInImportPath = false;
for (const importPath of job.importPaths) { for (const importPath of job.importPaths) {
console.warn(importPath);
console.warn(asset.originalPath);
if (asset.originalPath.startsWith(importPath)) { if (asset.originalPath.startsWith(importPath)) {
existsInImportPath = true; existsInImportPath = true;
break; break;
@ -648,7 +650,8 @@ export class LibraryService extends EventEmitter {
return validation; return validation;
}) })
.filter((validation) => validation.isValid) .filter((validation) => validation.isValid)
.map((validation) => validation.importPath); .map((validation) => validation.importPath)
.map((importPath) => path.normalize(importPath));
const crawledAssets = this.storageRepository.walk({ const crawledAssets = this.storageRepository.walk({
pathsToCrawl: validImportPaths, pathsToCrawl: validImportPaths,