comparison src/fileio.c @ 7629:befbed72da87 v7.4.1114

commit https://github.com/vim/vim/commit/43a34f9f74fdce462fa250baab620264c28b6165 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 17 15:56:34 2016 +0100 patch 7.4.1114 Problem: delete() does not work well with symbolic links. Solution: Recognize symbolik links.
author Christian Brabandt <cb@256bit.org>
date Sun, 17 Jan 2016 16:00:05 +0100
parents 228ff048db20
children 2a280b8e7040
comparison
equal deleted inserted replaced
7628:d74db83fa956 7629:befbed72da87
7292 char_u **files; 7292 char_u **files;
7293 int file_count; 7293 int file_count;
7294 int i; 7294 int i;
7295 char_u *exp; 7295 char_u *exp;
7296 7296
7297 if (mch_isdir(name)) 7297 /* A symbolic link to a directory itself is deleted, not the directory it
7298 * points to. */
7299 if (
7300 # if defined(WIN32)
7301 mch_isdir(name) && !mch_is_symbolic_link(name)
7302 # else
7303 # ifdef UNIX
7304 mch_isrealdir(name)
7305 # else
7306 mch_isdir(name)
7307 # endif
7308 # endif
7309 )
7298 { 7310 {
7299 vim_snprintf((char *)NameBuff, MAXPATHL, "%s/*", name); 7311 vim_snprintf((char *)NameBuff, MAXPATHL, "%s/*", name);
7300 exp = vim_strsave(NameBuff); 7312 exp = vim_strsave(NameBuff);
7301 if (exp == NULL) 7313 if (exp == NULL)
7302 return -1; 7314 return -1;