Repository navigation
fix(files): Collectives banner activation for matching folder paths - #2679
Merged
Merged
Conversation
joshtrichards
requested review from
max-nextcloud,
mejo- and
silverkszlo
as code owners
August 4, 2026 15:48
mejo-
reviewed
Aug 4, 2026
| const folder = collectivesFolder?.replace(/\/$/, '') | ||
| this.active = Boolean( | ||
| folder | ||
| && folder !== '/' |
Member
There was a problem hiding this comment.
To my understanding this now no longer can match, as the replace above would change / to an empty string, no?
Member
Author
There was a problem hiding this comment.
The replace should just safely remove any trailing slash right away; creating a predictable baseline string.
Member
There was a problem hiding this comment.
Sure, and i think it makes sense. My point was that folder !== '/' will now always be true, as folder will never again be / given that the trailing slash is removed beforehands.
mejo-
force-pushed
the
jtr/fix-FlieListInfo-detection
branch
from
November 17, 2026 16:30
92ac82b to
80d0743
Compare
Member
|
@joshtrichards I took the liberty to amend your commit and address the comment I had. |
Signed-off-by: Josh <josh.t.richards@gmail.com> Signed-off-by: Jonas <jonas@freesources.org>
mejo-
force-pushed
the
jtr/fix-FlieListInfo-detection
branch
from
November 17, 2026 16:32
80d0743 to
063c0aa
Compare
mejo-
approved these changes
Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Summary
Fixes a potential issue where the Collectives Files banner could be activated for paths that only partially matched the configured Collectives folder.
The previous
startsWith()check could treat a folder such as/Collectives-oldas being inside/Collectives.🖼️ Screenshots
🚧 TODO
🏁 Checklist
npm run lint/npm run stylelint/composer run cs:check)🤖 AI (if applicable)