TerminalFont (Windows): better portable mode detection of Windows Terminal

`.portable` can be a folder.

Fix #784
This commit is contained in:
李通洲
2024-04-08 22:27:52 +08:00
parent 67564dfa2c
commit 12ca1a0cf7
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -174,7 +174,7 @@ static void detectFromWindowsTeriminal(const FFstrbuf* terminalExe, FFTerminalFo
char* pathEnd = jsonPath + strlen(jsonPath);
strncpy(pathEnd, ".portable", sizeof(jsonPath) - (size_t) (pathEnd - jsonPath) - 1);
if(ffPathExists(jsonPath, FF_PATHTYPE_FILE))
if(ffPathExists(jsonPath, FF_PATHTYPE_ANY))
{
strncpy(pathEnd, "settings\\settings.json", sizeof(jsonPath) - (size_t) (pathEnd - jsonPath) - 1);
if(!ffAppendFileBuffer(jsonPath, &json))