From 02cf10acf7403472fb1e2077678be96b34f20c79 Mon Sep 17 00:00:00 2001 From: Lars Viklund Date: Fri, 19 Apr 2024 04:09:14 +0200 Subject: [PATCH] fix: turn update paths relative for wide installs The updater is a fixed piece of older code that uses a Lua runtime that only handles paths that are representable in the user's text codepage. As the software may be installed in a location that cannot be expressed in that way, to mitigate the problem we turn all the paths in the update op-files into relative paths. That way as long as we never use exotic codepoints in our own paths it should be able to apply them cleanly and restart Path of Building afterward with a relative path. The updater executable can ironically enough not be updated at all with the related type of runtime hacks we introduced in SimpleGraphic as the updater deadlocks in updating itself. We have to work around its shortcomings in how we produce the op-files and possibly the update application script that runs under that limited runtime. --- src/UpdateCheck.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/UpdateCheck.lua b/src/UpdateCheck.lua index 636473305..000232ab2 100644 --- a/src/UpdateCheck.lua +++ b/src/UpdateCheck.lua @@ -78,8 +78,8 @@ end ConPrintf("Checking for update...") -local scriptPath = GetScriptPath() -local runtimePath = GetRuntimePath() +local scriptPath = "." +local runtimePath = "." -- Load and process local manifest local localVer