From 7748ed17ba7a46f09a817b3bdb53ecf1d0f3dce9 Mon Sep 17 00:00:00 2001 From: Dan Zwell Date: Sat, 4 Jul 2026 13:50:40 +0800 Subject: [PATCH] Fix the path to the user directory on Windows This fixes #695. --- lib/dtutils/string.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dtutils/string.lua b/lib/dtutils/string.lua index 6d8c41bc..dd878f79 100644 --- a/lib/dtutils/string.lua +++ b/lib/dtutils/string.lua @@ -637,7 +637,7 @@ local PLACEHOLDERS = {"ROLL.NAME", local PS = dt.configuration.running_os == "windows" and "\\" or "/" local USER = os.getenv("USERNAME") -local HOME = dt.configuration.running_os == "windows" and os.getenv("HOMEPATH") or os.getenv("HOME") +local HOME = dt.configuration.running_os == "windows" and os.getenv("USERPROFILE") or os.getenv("HOME") local PICTURES = HOME .. PS .. (dt.configuration.running_os == "windows" and "My Pictures" or "Pictures") local DESKTOP = HOME .. PS .. "Desktop"