Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Exception in the startup.py tries to open a random command line file #384

Copy link
Copy link

Description

@andry81
Issue body actions
  • 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.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.