diff --git a/neko_daemonizer_dante/daemonizer/_daemonize_windows.py b/neko_daemonizer_dante/daemonizer/_daemonize_windows.py index 173a338..1229db1 100644 --- a/neko_daemonizer_dante/daemonizer/_daemonize_windows.py +++ b/neko_daemonizer_dante/daemonizer/_daemonize_windows.py @@ -378,7 +378,9 @@ def _daemonize1(pid_file, *args, chdir=None, stdin_goto=None, stdout_goto=None, before_script = '"' if script_path.endswith('\\__main__.py'): - script_path = script_path[:-12].split('\\')[-1] + script_path = script_path[:-12] + script_path = script_path.removeprefix(os.getcwd()) + script_path = script_path.replace('\\', '.').removeprefix('.') before_script = '-m "' if explicit_rescript is None: