mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-20 21:13:25 +08:00
Merge pull request #4133 from RaiKoHoff/Dev_Master
Fix directory locking of current file.
This commit is contained in:
commit
5a8a689d04
@ -10672,14 +10672,6 @@ bool FileLoad(const HPATHL hfile_pth, FileLoadFlags fLoadFlags)
|
||||
|
||||
Path_NormalizeEx(hopen_file, Paths.WorkingDirectory, true, Flags.bSearchPathIfRelative);
|
||||
|
||||
// change current directory to prevent directory lock on another path
|
||||
HPATHL hdir_pth = Path_Copy(hopen_file);
|
||||
Path_RemoveFileSpec(hdir_pth);
|
||||
if (Path_IsExistingDirectory(hdir_pth)) {
|
||||
SetCurrentDirectoryW(Path_Get(hdir_pth));
|
||||
}
|
||||
Path_Release(hdir_pth);
|
||||
|
||||
// Ask to create a new file...
|
||||
if (!(fLoadFlags & FLF_Reload) && !Path_IsExistingFile(hopen_file)) {
|
||||
bool bCreateFile = s_flagQuietCreate;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user