/
/
# What does this implement/fix? Six places in the code worked out a folder or file name by chopping a path string up on the path separator. Path already does this in one step, so they now use that instead. The PTH206 lint rule is switched on so the old pattern does not creep back in. This is the second of the pathlib lint rules, following #5777. **One of these changes what you see in the UI.** In the local filesystem provider, if the music folder was set with a trailing slash, the old code worked out an empty name. The provider then fell back to numbering itself, so it appeared as "Local Files [2]". It now uses the folder name, so "Local Files [Music]". That is fine because it only shows up if you have more than one local filesystem provider set up and you typed the path with a trailing slash, anyone who has given the provider their own name is untouched, and the folder name is more useful than a number. Changes: - Local filesystem provider: folder name for the provider name postfix, the artist folder fallback, and the artist and album folder lookups - Process helper: process name taken from the command path - Config entries check script: provider path matching - Turn on the PTH206 lint rule **Related issue (if applicable):** - n/a ## Types of changes - [ ] Bugfix (non-breaking change which fixes an issue) — `bugfix` - [ ] New feature (non-breaking change which adds functionality) — `new-feature` - [ ] Enhancement to an existing feature — `enhancement` - [ ] New music/player/metadata/plugin provider — `new-provider` - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) — `breaking-change` - [ ] Refactor (no behaviour change) — `refactor` - [ ] Documentation only — `documentation` - [x] Maintenance / chore — `maintenance` - [ ] CI / workflow change — `ci` - [ ] Dependencies bump — `dependencies` ## Checklist - [x] The code change is tested and works locally. - [x] `pre-commit run --all-files` passes. - [x] `pytest` passes, and tests have been added/updated under `tests/` where applicable. - [ ] For changes to shared models, the companion PR in `music-assistant/models` is linked. - [ ] For changes affecting the UI, the companion PR in `music-assistant/frontend` is linked. - [x] I have read and complied with the project's [AI Policy](https://github.com/music-assistant/.github/blob/main/AI_POLICY.md) for any AI-assisted contributions. - [ ] I have [raised a PR against the documentation repository](https://github.com/music-assistant/music-assistant.io/blob/main/CONTRIBUTING.md) targeting the main or beta branch as appropriate.