mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
+ fix: Path_ToShortPathName() for grepWinNP3 startup
This commit is contained in:
parent
49a456af5b
commit
2ef2ffb8c6
@ -4782,8 +4782,10 @@ void DialogGrepWin(HWND hwnd, LPCWSTR searchPattern)
|
||||
// relative grepWinNP3.ini path (for shorter cmdline)
|
||||
if (Path_RelativePathTo(hTemp, hGrepWinDir, FILE_ATTRIBUTE_DIRECTORY, hGrepWinIniPath, FILE_ATTRIBUTE_NORMAL)) {
|
||||
Path_Swap(hGrepWinIniPath, hTemp);
|
||||
}
|
||||
Path_ToShortPathName(hGrepWinIniPath);
|
||||
}
|
||||
else {
|
||||
Path_ToShortPathName(hGrepWinIniPath);
|
||||
}
|
||||
StrgFormat(hstrParams, L"/portable /content %s /inipath:\"%s\"", StrgGet(hstrOptions), Path_Get(hGrepWinIniPath));
|
||||
} else {
|
||||
StrgFormat(hstrParams, L"/portable /content %s", StrgGet(hstrOptions));
|
||||
|
||||
@ -1318,7 +1318,9 @@ size_t PTHAPI Path_ToShortPathName(HPATHL hpth_in_out)
|
||||
|
||||
DWORD const _len = GetShortPathNameW(StrgGet(hstr_io), NULL, 0);
|
||||
if (!_len) {
|
||||
#ifdef DEBUG
|
||||
MsgBoxLastError(L"Path_ToShortPathName()", 0);
|
||||
#endif // DEBUG
|
||||
return 0;
|
||||
}
|
||||
LPWSTR const buf = StrgWriteAccessBuf(hstr_io, _len);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user