diff -r 60e8f2175b3b -r b4299b82fe37 src/eric7/EricWidgets/EricSingleApplication.py --- a/src/eric7/EricWidgets/EricSingleApplication.py Thu Nov 09 11:23:48 2023 +0100 +++ b/src/eric7/EricWidgets/EricSingleApplication.py Thu Nov 09 14:27:21 2023 +0100 @@ -10,7 +10,6 @@ import os from eric7.EricWidgets.EricApplication import ericApp -from eric7.SystemUtilities import OSUtilities from eric7.Toolbox.SingleApplication import ( SingleApplicationClient, SingleApplicationServer, @@ -119,27 +118,16 @@ if args is None: return - # holds space delimited list of command args, if any - argsStr = None - # flag indicating '--' options was found - ddseen = False - - argChars = ["-", "/"] if OSUtilities.isWindowsPlatform() else ["-"] + if "--" in args: + # store args after a '--' as a space delimited list of command args, if any + ddindex = args.index("--") + argsStr = " ".join(args[ddindex + 1:]) + args = args[:ddindex] + else: + argsStr = None for arg in args: - if arg == "--" and not ddseen: - ddseen = True - continue - - if arg[0] in argChars or ddseen: - if argsStr is None: - argsStr = arg - else: - argsStr = "{0} {1}".format(argsStr, arg) - continue - - ext = os.path.splitext(arg)[1] - ext = os.path.normcase(ext) + ext = os.path.normcase(os.path.splitext(arg)[1]) if ext in (".epj", ".e4p"): self.__openProject(arg)