apache/couchdb — pull request #33 by adamlofts (2012-09-25 13:51:36+00:00)
Title: Ensure that nuke_dir properly deletes the folder

nuke_dir() was calling couch_file:delete() which expects to be passed a file. This pull request splits out a delete_rename() function and adds nuke_dir_sync() to actually remove the folder once it is renamed.

There is also a small performance improvement by deleting the folder asynchronously after it has been renamed.

The second commit reuses the nuke_dir_sync() function to clean up the .delete folder on startup because it can now contain deleted folders.