From 719185a293ac1b377bc7e5f7695eb6a94f73b6bf Mon Sep 17 00:00:00 2001 From: Tung Huynh Date: Tue, 5 Dec 2023 00:06:12 -0800 Subject: [PATCH] patch(lua): discard basedir and DIR_SEP on UWP --- ...a-discard-basedir-and-DIR_SEP-on-UWP.patch | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 patches/0001-lua-discard-basedir-and-DIR_SEP-on-UWP.patch diff --git a/patches/0001-lua-discard-basedir-and-DIR_SEP-on-UWP.patch b/patches/0001-lua-discard-basedir-and-DIR_SEP-on-UWP.patch new file mode 100644 index 0000000..8648c88 --- /dev/null +++ b/patches/0001-lua-discard-basedir-and-DIR_SEP-on-UWP.patch @@ -0,0 +1,34 @@ +From 7d9e7f13fc7147b1d7cd4718c2df4328b578a23a Mon Sep 17 00:00:00 2001 +From: Johannes Kauffmann +Date: Sun, 31 Oct 2021 11:13:25 +0100 +Subject: [PATCH] lua: discard basedir and DIR_SEP on UWP + +On UWP, the lua folder is deployed right next to the executable in the +app installation folder, but the path returned by config_GetUserDir +(which is basedir) points to the local packages folder, located in the +current user AppData folder. Therefore, discard basedir and the +directory separator, to allow VLC to find the lua folder. +--- + modules/lua/vlc.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/modules/lua/vlc.c b/modules/lua/vlc.c +index f20f931f189..ab0e5a4f334 100644 +--- a/modules/lua/vlc.c ++++ b/modules/lua/vlc.c +@@ -183,8 +183,12 @@ static char **vlclua_dir_list_append( char **restrict list, char *basedir, + if (unlikely(basedir == NULL)) + return list; + ++#ifndef VLC_WINSTORE_APP + if (likely(asprintf(list, "%s"DIR_SEP"lua"DIR_SEP"%s", + basedir, luadirname) != -1)) ++#else ++ if (likely(asprintf(list, "lua"DIR_SEP"%s", luadirname) != -1)) ++#endif + list++; + + free(basedir); +-- +GitLab +