Menu

cmdline fileopen fails/crashes?

2007-04-05
2012-11-13
  • Nobody/Anonymous

    When attempting to open a file from the command-line and a filename contains spaces in it's full filespec form, notepad++ parses the filename "parts" and attempts to open them separately. Don't say yes, create new when in "c:\program files\...". It will create c:\program

    For example:

    cd "\program files\notepad++"
    notepad++.exe change.log

    notepad++.exe "change.log"

    Both calls to notepad++ with change.log fail in v4.0 and v4.0.2

    During the "testing" notepad++ crashed, I allowed the MS "trapper" to send you the info.

    Hate to say Notepad++ is not ready to replace notepad.exe with this critical error.

     
    • Nobody/Anonymous

      Small addition/clarification...the failure to open/unable to find file example can be extended to all files whose full filespec contains spaces i.e. directory file is located contains spaces.

      First example is the most simple to recreate but this can be recreated by adding Notepad++ to the PATH environment variable and trying to open any file in "c:\Documents and Settings" as well as any other directory structure where a space exist.

      Recreate:

      cd "C:\Documents and Settings\patrick\My Documents\Visual Studio 2005\Code Snippets"
      notepad++ myfavcode.c
      "C:\Program Files\Notepad++\notepad++.exe" myfavcode.c

      notepad++ pops up a dialog saying "c:\Documents" doesn't exist. Create it?" It continues with all the spaces.

      It ONLY works when "myfavcode.c" fully specified and enclosed within quotes.

      Notepad++ is such a great editor for this to be a crimp in it's armor! I tire of using vi or loading emacs just to do a quick source-code view/edit under Windows. Haven't looked at the source but appears to be a cmd-line parsing issue since it does not occur with File-Open with notepad++.

      This was tested under v4.0 and 4.0.2 on WinXP Pro SP2.

      Cheers

       
      • Don HO

        Don HO - 2007-04-06

        This bug will be fixed in the next release (v4.1)

        Don

         
        • Nobody/Anonymous

          It's still a bit iffy in version 4.1.1 if you use relative paths:

          Steps to reproduce:
          1. Launch npp
          2. Open c:\boot.ini (or similar)
          3. On command line do:
          3a. cd \winnt\system
          3b. "C:\Program Files\Notepad++\Notepad++.exe" "..\system32\eula.txt" (*)

          (*) Or similar file.  The file must exist, and it should be in a different directory than the file from step 2.  The path to the file must be relative.

          This results in "Doesn't exist. Create it"

          Btw: The current setting for "Remember the current session for next launch" is not reflected when you open the preferences dialog (MISC tab).