From: Marcel van der Veldt Date: Wed, 8 Jan 2025 23:03:56 +0000 (+0100) Subject: Fix: SMB provider on macos X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=a021d7c7b24a851d897fcb871483a8885e977a07;p=music-assistant-server.git Fix: SMB provider on macos --- diff --git a/music_assistant/providers/filesystem_smb/__init__.py b/music_assistant/providers/filesystem_smb/__init__.py index a510876d..b29b5b71 100644 --- a/music_assistant/providers/filesystem_smb/__init__.py +++ b/music_assistant/providers/filesystem_smb/__init__.py @@ -173,6 +173,11 @@ class SMBFileSystemProvider(LocalFileSystemProvider): if subfolder.endswith("/"): subfolder = subfolder[:-1] + env_vars = { + **os.environ, + "USER": username, + } + if platform.system() == "Darwin": # NOTE: MacOS does not support special characters in the username/password password_str = f":{password}" if password else "" @@ -192,10 +197,6 @@ class SMBFileSystemProvider(LocalFileSystemProvider): # pass the username+password using (scoped) env variables # to prevent leaking in the process list and special chars supported - env_vars = { - **os.environ, - "USER": username, - } if password: env_vars["PASSWD"] = str(password)