Skip to content

Commit

Permalink
#4026 workaround for broken relative paths
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Nov 12, 2023
1 parent 06def20 commit 8f510e4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions xpra/scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2032,6 +2032,14 @@ def run_remote_server(script_file:str, cmdline, error_cb, opts, args, mode:str,
""" Uses the regular XpraClient with patched proxy arguments to tell run_proxy to start the server """
if not args:
raise RuntimeError("no remote server specified")
if WIN32:
# see issue #4026
# we have to extract the exe name then get an abs path for it:
# so that someone running xpra using:
# `Xpra-x86_64_6.0-r34669M\xpra_cmd" attach ...`
# will still end up with a valid absolute path
# when the exe wrapper changes directory to `Xpra-x86_64_6.0-r34669M`.
script_file = os.path.basename(script_file)
abs_script_file = os.path.abspath(script_file)
display_name = args[0]
params = parse_display_name(error_cb, opts, display_name, cmdline)
Expand Down

0 comments on commit 8f510e4

Please sign in to comment.