bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24714: delete-directory race condition


From: Eli Zaretskii
Subject: bug#24714: delete-directory race condition
Date: Mon, 17 Oct 2016 09:19:34 +0300

> From: Glenn Morris <address@hidden>
> Date: Sun, 16 Oct 2016 22:20:45 -0400
> 
> I believe this is due to a race condition in delete-directory.
> Emacs seems to be lacking an equivalent of "rm -rf".
> 
> (delete-directory "/tmp/foo")
> 
> will fail with "No such file or directory" if a file in /tmp/foo
> happen to be deleted by some other process in between the time that
> delete-directory calls directory-files and the time it calls delete-file.

IMO, delete-directory should simply catch ENOENT errors and ignore
them when it deletes files and subdirectories under the "recursive"
option.  Other errors should signal an error as they do now.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]