From 25d81987b91e217afd2084f3287604c9f82ff28a Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Fri, 13 Oct 2023 17:43:01 -0700 Subject: [PATCH] tq: exclude hidden mounts Signed-off-by: Varun Patil --- lib/Db/TimelineRoot.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/Db/TimelineRoot.php b/lib/Db/TimelineRoot.php index fd3a248d..5544ce1d 100644 --- a/lib/Db/TimelineRoot.php +++ b/lib/Db/TimelineRoot.php @@ -48,7 +48,16 @@ class TimelineRoot foreach ($this->folderPaths as $id => $folderPath) { $mounts = $manager->findIn($folderPath); foreach ($mounts as $mount) { - $this->setFolder($mount->getStorageRootId(), null, $mount->getMountPoint()); + $id = $mount->getStorageRootId(); + $path = $mount->getMountPoint(); + + // Ignore hidden mounts or any mounts in hidden folders + // (any edge cases/exceptions here?) + if (str_contains($path, '/.')) { + continue; + } + + $this->setFolder($id, null, $path); } } }