On 16 January 2016, Bram Moolenaar <[email protected]> wrote:
> 
> Patch 7.4.1107
> Problem:    Vim can create a directory but not delete it.
> Solution:   Add an argument to delete() to make it possible to delete a
>             directory, also recursively.
> Files:      src/fileio.c, src/eval.c, src/proto/fileio.pro,
>             src/testdir/test_delete.vim, src/testdir/test_alot.vim,
>             runtime/doc/eval.txt
[...]
> *** ../vim-7.4.1106/runtime/doc/eval.txt      2016-01-15 20:48:09.862003231 
> +0100
> --- runtime/doc/eval.txt      2016-01-16 20:34:22.280259614 +0100
> ! delete({fname} [, {flags}])                                 *delete()*
> !             Without {flags} or with {flags} empty: Deletes the file by the
> !             name {fname}.
> ! 
> !             When {flags} is "d": Deletes the directory by the name
> !             {fname}.  This fails when {fname} is not empty.
> !             
> !             When {flags} is "rf": Deletes the directory by the name
> !             {fname} and everything in it, recursively.  Be careful!
[...]

    There seems to be a serious problem with delete("dir", "rf"):
if "dir" has a symlink descendant then (1) the symlink is followed
(that is, the content of the directory symlink points to is deleted
recursively), (2) the symlink is not deleted, and (3) the operation
returns -1, signifying failure.  I believe neither of this is expected,
or useful.

    /lcd

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui