0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.4654: missing changes for import check

Problem:    Missing changes for import check.
Solution:   Add missing changes.
This commit is contained in:
Bram Moolenaar
2022-03-31 11:51:21 +01:00
parent 4dea2d92e4
commit 49d008d96b
2 changed files with 10 additions and 1 deletions

View File

@@ -399,7 +399,14 @@ handle_import_fname(char_u *fname, int is_autoload, int *sid)
{
int error = OK;
// script does not exist yet, create a new scriptitem
// Script does not exist yet, check name and create a new
// scriptitem.
if (!file_is_readable(fname))
{
semsg(_(mch_isdir(fname) ? e_str_is_directory
: e_cannot_read_from_str_2), fname);
return FAIL;
}
*sid = get_new_scriptitem_for_fname(&error, fname);
if (error == FAIL)
return FAIL;