fix(web): absolute path match in external library (#19551)

This commit is contained in:
Daimolean 2025-06-26 23:46:34 +08:00 committed by GitHub
parent 934649c8df
commit 926ff075a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,12 +22,12 @@ export class ViewRepository {
.where('localDateTime', 'is not', null)
.execute();
return results.map((row) => row.directoryPath.replaceAll(/^\/|\/$/g, ''));
return results.map((row) => row.directoryPath.replaceAll(/\/$/g, ''));
}
@GenerateSql({ params: [DummyValue.UUID, DummyValue.STRING] })
async getAssetsByOriginalPath(userId: string, partialPath: string) {
const normalizedPath = partialPath.replaceAll(/^\/|\/$/g, '');
const normalizedPath = partialPath.replaceAll(/\/$/g, '');
return this.db
.selectFrom('assets')