forked from Cutlery/immich
normalize import path
This commit is contained in:
parent
11eb7f7c3f
commit
7858cf4009
@ -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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user