Fix windows slash escape java override

This commit is contained in:
amcmanu3 2022-12-19 17:44:04 -05:00
parent 37071a2d05
commit 9004feff37

View File

@ -1554,7 +1554,10 @@ class PanelHandler(BaseHandler):
return return
if java_selection: if java_selection:
try: try:
execution_list = shlex.split(execution_command) if self.helper.is_os_windows():
execution_list = shlex.split(execution_command, posix=False)
else:
execution_list = shlex.split(execution_command, posix=True)
except ValueError: except ValueError:
self.redirect( self.redirect(
"/panel/error?error=Invalid execution command. Java path" "/panel/error?error=Invalid execution command. Java path"
@ -1589,6 +1592,7 @@ class PanelHandler(BaseHandler):
execution_list[0] = "java" execution_list[0] = "java"
execution_command = "" execution_command = ""
for item in execution_list: for item in execution_list:
print(item)
execution_command += item + " " execution_command += item + " "
server_obj: Servers = self.controller.servers.get_server_obj(server_id) server_obj: Servers = self.controller.servers.get_server_obj(server_id)