From: Bram Moolenaar Date: Tue, 18 Jan 2022 13:43:58 +0000 (+0000) Subject: patch 8.2.4134: MS-Windows: test for import with absolute path fails X-Git-Tag: v8.2.4134 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=113b8dc111febf605cd1492788353be6c3931fce;p=vim patch 8.2.4134: MS-Windows: test for import with absolute path fails Problem: MS-Windows: test for import with absolute path fails. Solution: Handle path starting with slash as an absolute path. --- diff --git a/src/version.c b/src/version.c index 1e9ab2dd9..8ac5c0867 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 4134, /**/ 4133, /**/ diff --git a/src/vim9script.c b/src/vim9script.c index 41df6bfc4..b35634786 100644 --- a/src/vim9script.c +++ b/src/vim9script.c @@ -468,7 +468,13 @@ handle_import( vim_free(from_name); } } - else if (mch_isFullName(tv.vval.v_string)) + else if (mch_isFullName(tv.vval.v_string) +#ifdef BACKSLASH_IN_FILENAME + // On MS-Windows omitting the drive is still handled like an + // absolute path, not using 'runtimepath'. + || *tv.vval.v_string == '/' || *tv.vval.v_string == '\\' +#endif + ) { // Absolute path: "/tmp/name.vim" if (is_autoload)