From e8ca861512e8e6c2ba343e16e524b163eb506190 Mon Sep 17 00:00:00 2001 From: Guldoman Date: Tue, 16 Aug 2022 23:53:03 +0200 Subject: [PATCH] Remove final `PATHSEP` in `common.normalize_volume` --- data/core/common.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/core/common.lua b/data/core/common.lua index c7932455..5406f170 100644 --- a/data/core/common.lua +++ b/data/core/common.lua @@ -370,11 +370,11 @@ end -- absolute path without . or .. elements. -- This function exists because on Windows the drive letter returned -- by system.absolute_path is sometimes with a lower case and sometimes --- with an upper case to we normalize to upper case. +-- with an upper case so we normalize to upper case. function common.normalize_volume(filename) if not filename then return end if PATHSEP == '\\' then - local drive, rem = filename:match('^([a-zA-Z]:\\)(.*)') + local drive, rem = filename:match('^([a-zA-Z]:\\)(.-)'..PATHSEP..'?$') if drive then return drive:upper() .. rem end