Skip to content

platformdirs: user_config_path returns two nested folders in Windows 11 #471

@orestisfra

Description

@orestisfra

Hello everyone,

I have the following code:

self.path_to_config = user_config_path(appname="appname", appauthor=None, version=None)
print("Raw user_config_path:", self.path_to_config)
self.path_to_config.mkdir(parents=True, exist_ok=True)

print and mkdir returns a nested folder structure ~/AppData/Local/appname/appname

I have tried: user_config_path("appname") , user_config_path(appname="appname", appauthor="appname", version=None) , user_config_dir as a workaround but the only thing that works is to do user_config_path(appname="None", appauthor=None, version=None) (or similar with user_config_dir) and setting the folder name for each config file.

Platform: Windows 11 Home 25H2, OS build 26200.8037, Lenovo IdeaPad 1 15AMN7, and platformdirs 4.9.4 on python 3.13.12. I don't know if this is a Microslop issue or a platformdirs issue but right now I cannot check on Linux.

I have to ask: is this intended behavior? It seems to me like it is not.

Thank you for your time

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions