diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-01-18 13:43:58 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-01-18 13:43:58 +0000 |
commit | 113b8dc111febf605cd1492788353be6c3931fce (patch) | |
tree | ca881dba714b28a3b458b81afdbf3d41416fc3b9 /src/vim9script.c | |
parent | 840f16202e1ae2d574507ef52a7e8a98775f243c (diff) | |
download | vim-git-113b8dc111febf605cd1492788353be6c3931fce.tar.gz |
patch 8.2.4134: MS-Windows: test for import with absolute path failsv8.2.4134
Problem: MS-Windows: test for import with absolute path fails.
Solution: Handle path starting with slash as an absolute path.
Diffstat (limited to 'src/vim9script.c')
-rw-r--r-- | src/vim9script.c | 8 |
1 files changed, 7 insertions, 1 deletions
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) |