[RFC] vim-patch:8.1.1378: delete() can not handle a file name that looks li… (#16268)

Problem:    Delete() can not handle a file name that looks like a pattern.
Solution:   Use readdir() instead of appending "/*" and expanding wildcards.
            (Ken Takata, closes vim/vim#4424, closes vim/vim#696)
701ff0a3e5

Cherry-pick a change to Test_delete_rf() from patch 8.1.1921.

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
Shougo
2022-04-03 21:27:46 +09:00
committed by GitHub
parent 6786b6afad
commit e9e16655af
5 changed files with 115 additions and 99 deletions

View File

@@ -3,6 +3,8 @@
#include "nvim/autocmd.h"
#include "nvim/buffer_defs.h"
#include "nvim/eval/typval.h"
#include "nvim/garray.h"
#include "nvim/os/os.h"
// Values for readfile() flags
@@ -17,6 +19,8 @@
#define READ_STRING(x, y) (char_u *)read_string((x), (size_t)(y))
typedef varnumber_T (*CheckItem)(void *expr, const char *name);
#ifdef INCLUDE_GENERATED_DECLARATIONS
// Events for autocommands
# include "fileio.h.generated.h"