timeline-root: fix .nomedia matching (fix #668)

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/672/head
Varun Patil 2023-05-30 10:36:20 -07:00
parent a001361f20
commit 483bf74d29
1 changed files with 4 additions and 1 deletions

View File

@ -64,7 +64,10 @@ class TimelineRoot
{
foreach ($paths as $path) {
foreach ($this->folderPaths as $id => $folderPath) {
if (str_starts_with($folderPath, $path)) {
// dirname strips the trailing slash, so we can directly add a
// trailing slash to folderPath and path to prevent false matches.
// https://github.com/pulsejet/memories/issues/668
if (str_starts_with($folderPath.'/', $path.'/')) {
unset($this->folderPaths[$id], $this->folders[$id]);
}
}