Skip to content

Hide dotfiles from instance content scanning#5999

Merged
fetchfern merged 7 commits intomodrinth:mainfrom
acorsicanfrog:patch-1
May 9, 2026
Merged

Hide dotfiles from instance content scanning#5999
fetchfern merged 7 commits intomodrinth:mainfrom
acorsicanfrog:patch-1

Conversation

@acorsicanfrog
Copy link
Copy Markdown
Contributor

Prevent hidden files such as .DS_Store from being treated as valid instance content.

This updates the profile scanning logic in packages/app-lib/src/state/profiles.rs to ignore basenames that start with '.', and applies that filter consistently in both scan paths.

Fixing this:

Screenshot 2026-05-05 at 13 14 35

Prevent hidden files such as .DS_Store from being treated as valid instance content.

This updates the profile scanning logic in [packages/app-lib/src/state/profiles.rs](/Users/froggy/Downloads/code-main/packages/app-lib/src/state/profiles.rs#L420) to ignore basenames that start with '.', and applies that filter consistently in both scan paths.

Signed-off-by: Corsican Frog <49497194+acorsicanfrog@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 5, 2026 11:35
@modrinth-bot
Copy link
Copy Markdown
Member

modrinth-bot commented May 5, 2026

Note

This changelog has been baked. Any further edits will not be reflected.

Pull request changelog

App

Added

Changed

Deprecated

Removed

Fixed

  • Fixed hidden files showing up in the Content tab on instances.

Security

Website

Added

Changed

Deprecated

Removed

Fixed

Security

Hosting

Added

Changed

Deprecated

Removed

Fixed

Security

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates profile content scanning in packages/app-lib so hidden dotfiles are no longer treated as installed instance content. It centralizes the ignore logic to keep the two scan paths aligned and fixes the false-positive content entries shown for files like .DS_Store.

Changes:

  • Added a shared should_ignore_project_file helper in profiles.rs.
  • Extended scan filtering to ignore basenames starting with ..
  • Reused the helper in both profile scan paths to keep behavior consistent.

@Prospector Prospector requested a review from a team May 5, 2026 17:05
Comment thread packages/app-lib/src/state/profiles.rs Outdated
Only scan supported content archives into instance content.

Accept .jar files for mods and .zip files for datapacks, resourcepacks, and shaderpacks, after trimming the .disabled suffix. 

This prevents .DS_Store and other unsupported files from appearing in the Content tab.

Signed-off-by: Corsican Frog <49497194+acorsicanfrog@users.noreply.github.com>
@acorsicanfrog acorsicanfrog requested a review from fetchfern May 6, 2026 16:48
@Prospector Prospector enabled auto-merge May 7, 2026 13:21
@fetchfern fetchfern disabled auto-merge May 9, 2026 21:03
@fetchfern
Copy link
Copy Markdown
Member

fetchfern commented May 9, 2026

Please run cargo fmt i can just do it actually

@fetchfern fetchfern enabled auto-merge May 9, 2026 21:13
@fetchfern fetchfern added this pull request to the merge queue May 9, 2026
Merged via the queue into modrinth:main with commit 7e769c7 May 9, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants