mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-12-06 14:24:04 +08:00
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.
This commit is contained in:
@@ -474,8 +474,10 @@ ifneq ($(wildcard $(QMK_USERSPACE)),)
|
||||
endif
|
||||
|
||||
# If the equivalent users directory exists in userspace, use that in preference to anything currently in the main repo
|
||||
ifneq ($(wildcard $(QMK_USERSPACE)/$(USER_PATH)),)
|
||||
USER_PATH := $(QMK_USERSPACE)/$(USER_PATH)
|
||||
ifneq ($(QMK_USERSPACE),)
|
||||
ifneq ($(wildcard $(QMK_USERSPACE)/$(USER_PATH)),)
|
||||
USER_PATH := $(QMK_USERSPACE)/$(USER_PATH)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Pull in user level rules.mk
|
||||
|
||||
Reference in New Issue
Block a user