mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
Fixing [] glob issue. fixes #621
This commit is contained in:
parent
43424526ee
commit
e1ffeb0173
@ -161,7 +161,9 @@ export class CoverManager implements IObjectManager {
|
||||
});
|
||||
} else {
|
||||
q.orWhere('directory.path GLOB :path', {
|
||||
path: DiskMangerWorker.pathFromParent(dir) + '*',
|
||||
path: DiskMangerWorker.pathFromParent(dir)
|
||||
// glob escaping. see https://github.com/bpatrik/pigallery2/issues/621
|
||||
.replaceAll('[', '[[]') + '*',
|
||||
});
|
||||
}
|
||||
})
|
||||
|
@ -84,7 +84,7 @@ describe('CoverManager', (sqlHelper: DBTestHelper) => {
|
||||
|
||||
|
||||
const setUpTestGallery = async (): Promise<void> => {
|
||||
const directory: ParentDirectoryDTO = TestHelper.getDirectoryEntry();
|
||||
const directory: ParentDirectoryDTO = TestHelper.getDirectoryEntry(null, 'éűáúőóüöÉŰÚŐÓÜÖ[]^[[]]][asd]');
|
||||
subDir = TestHelper.getDirectoryEntry(directory, 'The Phantom Menace');
|
||||
subDir2 = TestHelper.getDirectoryEntry(directory, 'Return of the Jedi');
|
||||
p = TestHelper.getPhotoEntry1(subDir);
|
Loading…
Reference in New Issue
Block a user