diff options
| author | psych3r <abdalrahman.mursi@gmail.com> | 2025-12-06 00:25:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-05 22:25:48 +0000 |
| commit | 08e5fcfdf44c73fbbc8887b100fccd00006aa02e (patch) | |
| tree | f3defb6a9ab7b70f692357daa8527798d6f4ecfc | |
| parent | 1322922c420e56ea45534d5fc74365168f5bf487 (diff) | |
Fix USER_PATH resolution on case-insensitive filesystems (#25853)
When QMK_USERSPACE is empty, the wildcard check in build_keyboard.mk
incorrectly matches user home directories on case-insensitive filesystems
(macOS/Windows), causing USER_PATH to resolve to an absolute path instead
of a relative path.
This only affects users whose username matches their user directory name
(e.g., username 'psycher' with home '/Users/psycher' and QMK user dir
'users/psycher').
Fix by checking if QMK_USERSPACE is non-empty before performing the
wildcard check.
| -rw-r--r-- | builddefs/build_keyboard.mk | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index dae8c07e3e..0df95342f9 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk | |||
| @@ -474,8 +474,10 @@ ifneq ($(wildcard $(QMK_USERSPACE)),) | |||
| 474 | endif | 474 | endif |
| 475 | 475 | ||
| 476 | # If the equivalent users directory exists in userspace, use that in preference to anything currently in the main repo | 476 | # If the equivalent users directory exists in userspace, use that in preference to anything currently in the main repo |
| 477 | ifneq ($(wildcard $(QMK_USERSPACE)/$(USER_PATH)),) | 477 | ifneq ($(QMK_USERSPACE),) |
| 478 | USER_PATH := $(QMK_USERSPACE)/$(USER_PATH) | 478 | ifneq ($(wildcard $(QMK_USERSPACE)/$(USER_PATH)),) |
| 479 | USER_PATH := $(QMK_USERSPACE)/$(USER_PATH) | ||
| 480 | endif | ||
| 479 | endif | 481 | endif |
| 480 | 482 | ||
| 481 | # Pull in user level rules.mk | 483 | # Pull in user level rules.mk |
