Skip to content

Category dir mapping results in duplicated category folder (movies/movies/1080p) #770

Description

@Veneziaisking

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

  1. Create a SABnzbd category named movies with Dir Mapping movies/1080p
  2. Send a download from Radarr (SABnzbd download client, category movies)
  3. Wait for the import to complete
  4. 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
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions