Fix archive filter with external storage

pull/62/head v2.1.2
Varun Patil 2022-09-25 16:36:57 -07:00
parent 0fc3db8e46
commit d1339add77
2 changed files with 3 additions and 4 deletions

View File

@ -34,7 +34,7 @@ The exact steps depend on your Nextcloud platform. If you use Docker for your Ne
- **MacOS**: `brew install exiftool` - **MacOS**: `brew install exiftool`
- **FreeBSD**: `sudo pkg install p5-Image-ExifTool` - **FreeBSD**: `sudo pkg install p5-Image-ExifTool`
]]></description> ]]></description>
<version>2.1.1</version> <version>2.1.2</version>
<licence>agpl</licence> <licence>agpl</licence>
<author mail="radialapps@gmail.com" >Varun Patil</author> <author mail="radialapps@gmail.com" >Varun Patil</author>
<website>https://github.com/pulsejet/memories</website> <website>https://github.com/pulsejet/memories</website>

View File

@ -70,11 +70,10 @@ trait TimelineQueryDays {
if (!empty($likePath)) { if (!empty($likePath)) {
$likePath .= '/'; $likePath .= '/';
} }
$likePath = $likePath . '%'; $pathQuery = $query->expr()->like('f.path', $query->createNamedParameter($likePath . '%'));
$pathQuery = $query->expr()->like('f.path', $query->createNamedParameter($likePath));
// Exclude/show archive folder // Exclude/show archive folder
$archiveLikePath = $finfo["path"] . '/' . \OCA\Memories\Util::$ARCHIVE_FOLDER . '/%'; $archiveLikePath = $likePath . \OCA\Memories\Util::$ARCHIVE_FOLDER . '/%';
if (!$archive) { if (!$archive) {
// Exclude archive folder // Exclude archive folder
$pathQuery = $query->expr()->andX( $pathQuery = $query->expr()->andX(