You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Answer Yes when notepad3 asks if you would like to create the file
Save
Quit
Repeat step 2
Expected result:
c:\mydirectory\foo.txt exists after step 4 and is re-opened at step 6
The working directory of Notepad3 is c:\mydirectory
Notepad3 looks only in the working directory for the file specified on the command line. It does not look in its own exe directory or in the PATH for that file.
Actual result:
c:\Program Files\Notepad3\foo.txt exists after step 4 and is re-opened at step 6
Notepad3's working directory is c:\Program Files\Notepad3
If a file is specified that does not exist locally or in the exe directory, it may be opened from some arbitrary location specified in the PATH.
This occurs even if I specify .\foo.txt or ..\mydirectory\foo.txt, which both should unambiguously signal that I want only a file in the current directory
The only way I can find to ensure that my file is created or opened from where I expect is to specify a full path
Remarks:
I see in the Process Start event in Process Monitor that notepad3.exe starts in c:\mydirectory. At some point during initialization, it changes its working directory to the exe location.
I can think of zero valid use cases for searching in the PATH for a text file. The PATH is intended to be used for locating executable files.
The text was updated successfully, but these errors were encountered:
Repro:
cd c:\mydirectory
c:\Program Files\Notepad3\Notepad3.exe foo.txt
Expected result:
c:\mydirectory\foo.txt
exists after step 4 and is re-opened at step 6c:\mydirectory
PATH
for that file.Actual result:
c:\Program Files\Notepad3\foo.txt
exists after step 4 and is re-opened at step 6c:\Program Files\Notepad3
PATH
..\foo.txt
or..\mydirectory\foo.txt
, which both should unambiguously signal that I want only a file in the current directoryRemarks:
I see in the Process Start event in Process Monitor that notepad3.exe starts in
c:\mydirectory
. At some point during initialization, it changes its working directory to the exe location.I can think of zero valid use cases for searching in the
PATH
for a text file. ThePATH
is intended to be used for locating executable files.The text was updated successfully, but these errors were encountered: