Describe the bug
When a category's Dir Mapping contains a path that starts with the same name as
the category itself, the final download path duplicates the category folder.
I have the SABnzbd category movies with Dir Mapping set to movies/1080p
(goal: have both movies and movies-4k categories land under a shared
movies/ folder, split by resolution).
When AltMount creates the category directories after saving the config, the
structure looks correct in the mount:
movies/1080p/
movies/2160p/
tv/1080p/
tv/2160p/
But after a download completes (sent from Radarr via the SABnzbd API), the
files end up in: "/movies/movies/1080p//"
So the category name is prepended once, and then the Dir Mapping (which also
starts with movies) is appended on top, duplicating the first segment.
My category configuration
| Category (label) |
Dir Mapping |
| movies |
movies/1080p |
| movies-4k |
movies/2160p |
| tv |
tv/1080p |
| tv-4k |
tv/2160p |
Steps to reproduce
- Create a SABnzbd category named
movies with Dir Mapping movies/1080p
- Send a download from Radarr (SABnzbd download client, category
movies)
- Wait for the import to complete
- Check the mount: the release is placed in
movies/movies/1080p/ instead of movies/1080p/
Expected behavior
The download should be placed in movies/1080p/<Release>/ — the Dir Mapping
should replace the category folder (or the category segment should be
deduplicated when the mapping already starts with the category name).
Environment
- AltMount version: v0.2.0 (dc80b5b)
- Installation: Docker
- OS: Debian 13
- Import strategy: SYMLINK
- Mount: FUSE
- Sent from: radarr Radarr version 6.2.1.10461 / Sonarr version 4.0.19.2979

Describe the bug
When a category's Dir Mapping contains a path that starts with the same name as
the category itself, the final download path duplicates the category folder.
I have the SABnzbd category
movieswith Dir Mapping set tomovies/1080p(goal: have both
moviesandmovies-4kcategories land under a sharedmovies/folder, split by resolution).When AltMount creates the category directories after saving the config, the
structure looks correct in the mount:
movies/1080p/
movies/2160p/
tv/1080p/
tv/2160p/
But after a download completes (sent from Radarr via the SABnzbd API), the
files end up in: "/movies/movies/1080p//"
So the category name is prepended once, and then the Dir Mapping (which also
starts with
movies) is appended on top, duplicating the first segment.My category configuration
Steps to reproduce
movieswith Dir Mappingmovies/1080pmovies)movies/movies/1080p/instead ofmovies/1080p/Expected behavior
The download should be placed in
movies/1080p/<Release>/— the Dir Mappingshould replace the category folder (or the category segment should be
deduplicated when the mapping already starts with the category name).
Environment