fixed name retrieval for files without a description

This commit is contained in:
freedom7341
2023-10-02 14:13:24 -06:00
parent c7d3ae27d1
commit 44270fd601

View File

@@ -321,12 +321,11 @@ BOOL CALLBACK NewItemDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LPARAM l
}
else
{
// TODO: fix this lol
PathStripPath(szFileBuffer);
PathCchRemoveExtension(szFileBuffer, ARRAYSIZE(szFileBuffer));
PathStripPath(szBuffer);
PathCchRemoveExtension(szBuffer, ARRAYSIZE(szBuffer));
}
SetDlgItemText(hWndDlg, IDD_NAME, (LPWSTR)szFileBuffer);
SetDlgItemText(hWndDlg, IDD_NAME, (LPWSTR)szBuffer);
break;
}