From 12ca1a0cf7540fd8ceef615a417c54539ebdc882 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Mon, 8 Apr 2024 22:27:52 +0800 Subject: [PATCH] TerminalFont (Windows): better portable mode detection of Windows Terminal `.portable` can be a folder. Fix #784 --- CHANGELOG.md | 5 +++++ src/detection/terminalfont/terminalfont.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 753feb5fd..a7f739db9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 2.9.2 + +Bugfixes: +* Better portable mode detection of Windows Terminal (TerminalFont, Windows) + # 2.9.1 Features: diff --git a/src/detection/terminalfont/terminalfont.c b/src/detection/terminalfont/terminalfont.c index f48c37caf..2c751a382 100644 --- a/src/detection/terminalfont/terminalfont.c +++ b/src/detection/terminalfont/terminalfont.c @@ -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))