-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Description
- PythonScript: 3.0.20.0
I have an extension to the Notepad++.
In the extension I have using the startup.py
to parse an extra command line looking like this:
notepad++.exe -nosession -multiInst -z --custom_parameter_1 -z "<path-to-custom-file-list>" -z --custom_parameter_2 -z custom_parameter_3
The startup.py
has a code:
...
with open(path_to_custom_file_list, 'rb') as file_list:
...
...
Which throws the exception:
FileNotFoundError: [Errno 2] No such file or directory: "<path-to-custom-file-list>"
This is ok, as long the file does not exist.
But, then Notepad++ tries to create a new file with the dialog box:
Create new file
"-z --custom_parameter_2 -z custom_parameter_3" doesn't exist. Create it?
Yes No
This is not expected. The Notepad++ should not proceed to open anything. Just open an empty tab instance would be enough.
I suspect the Notepad++ tries to detect the rest of the command line after a random file parameter as a path to a file.
Suggestion: May be command line cleanup in the default exception handler would be enough.
Metadata
Metadata
Assignees
Labels
No labels