From d1339add77166c74ae6620d90264ab461e034829 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Sun, 25 Sep 2022 16:36:57 -0700 Subject: [PATCH] Fix archive filter with external storage --- appinfo/info.xml | 2 +- lib/Db/TimelineQueryDays.php | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index 40ba6106..b74b2363 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -34,7 +34,7 @@ The exact steps depend on your Nextcloud platform. If you use Docker for your Ne - **MacOS**: `brew install exiftool` - **FreeBSD**: `sudo pkg install p5-Image-ExifTool` ]]> - 2.1.1 + 2.1.2 agpl Varun Patil https://github.com/pulsejet/memories diff --git a/lib/Db/TimelineQueryDays.php b/lib/Db/TimelineQueryDays.php index 70a6f725..0232b3f3 100644 --- a/lib/Db/TimelineQueryDays.php +++ b/lib/Db/TimelineQueryDays.php @@ -70,11 +70,10 @@ trait TimelineQueryDays { if (!empty($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 - $archiveLikePath = $finfo["path"] . '/' . \OCA\Memories\Util::$ARCHIVE_FOLDER . '/%'; + $archiveLikePath = $likePath . \OCA\Memories\Util::$ARCHIVE_FOLDER . '/%'; if (!$archive) { // Exclude archive folder $pathQuery = $query->expr()->andX(