From a021d7c7b24a851d897fcb871483a8885e977a07 Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Thu, 9 Jan 2025 00:03:56 +0100 Subject: [PATCH] Fix: SMB provider on macos --- music_assistant/providers/filesystem_smb/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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) -- 2.34.1