mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:04:16 -04:00
fix(web): absolute path match in external library (#19551)
This commit is contained in:
parent
934649c8df
commit
926ff075a3
@ -22,12 +22,12 @@ export class ViewRepository {
|
|||||||
.where('localDateTime', 'is not', null)
|
.where('localDateTime', 'is not', null)
|
||||||
.execute();
|
.execute();
|
||||||
|
|
||||||
return results.map((row) => row.directoryPath.replaceAll(/^\/|\/$/g, ''));
|
return results.map((row) => row.directoryPath.replaceAll(/\/$/g, ''));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GenerateSql({ params: [DummyValue.UUID, DummyValue.STRING] })
|
@GenerateSql({ params: [DummyValue.UUID, DummyValue.STRING] })
|
||||||
async getAssetsByOriginalPath(userId: string, partialPath: string) {
|
async getAssetsByOriginalPath(userId: string, partialPath: string) {
|
||||||
const normalizedPath = partialPath.replaceAll(/^\/|\/$/g, '');
|
const normalizedPath = partialPath.replaceAll(/\/$/g, '');
|
||||||
|
|
||||||
return this.db
|
return this.db
|
||||||
.selectFrom('assets')
|
.selectFrom('assets')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user