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

patch 7.4.1114

Problem:    delete() does not work well with symbolic links.
Solution:   Recognize symbolik links.
This commit is contained in:
Bram Moolenaar
2016-01-17 15:56:34 +01:00
parent 4119cf80e1
commit 43a34f9f74
7 changed files with 105 additions and 6 deletions

View File

@@ -7294,7 +7294,19 @@ delete_recursive(char_u *name)
int i;
char_u *exp;
if (mch_isdir(name))
/* A symbolic link to a directory itself is deleted, not the directory it
* points to. */
if (
# if defined(WIN32)
mch_isdir(name) && !mch_is_symbolic_link(name)
# else
# ifdef UNIX
mch_isrealdir(name)
# else
mch_isdir(name)
# endif
# endif
)
{
vim_snprintf((char *)NameBuff, MAXPATHL, "%s/*", name);
exp = vim_strsave(NameBuff);