Skip to content

fix(categories): hide dot-prefixed folders from category list - #1984

Open
xhon-pelushi wants to merge 1 commit into
nextcloud:mainfrom
xhon-pelushi:fix/hidden-attachment-folders-in-categories
Open

fix(categories): hide dot-prefixed folders from category list#1984
xhon-pelushi wants to merge 1 commit into
nextcloud:mainfrom
xhon-pelushi:fix/hidden-attachment-folders-in-categories

Conversation

@xhon-pelushi

Copy link
Copy Markdown

Summary

  • Skip dot-prefixed folders (e.g. Text editor .attachments.<id>) when gathering note categories.
  • Stops hidden attachment folders from showing up as empty categories in the sidebar.

Fixes #1866

Test plan

  • Create a note with an inline image via Text so an .attachments.* folder exists.
  • Confirm the Notes sidebar categories list does not include that folder.
  • Confirm normal user categories still appear.
  • composer run cs:check / composer run psalm if convenient.

The Text editor creates hidden ".attachments.<id>" folders alongside
notes to store inline images. gatherNoteFiles() treated every
subfolder as a user category, so these implementation-detail folders
showed up as empty categories in the sidebar and reappeared after
being deleted.

Skip folders whose name starts with "." when walking the notes tree.

Fixes nextcloud#1866
Signed-off-by: xhon-pelushi <xhon@pelushi.com>
@xhon-pelushi
xhon-pelushi force-pushed the fix/hidden-attachment-folders-in-categories branch from 1ee0902 to 33d9d40 Compare August 12, 2026 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unwanted .attachments folders in Categories

1 participant