diff src/lib-storage/index/dbox-common/dbox-storage.c @ 19136:fefaa6d09a81

Replaced unlink() calls with i_unlink*() wherever possible.
author Timo Sirainen <tss@iki.fi>
date Tue, 08 Sep 2015 19:07:02 +0300
parents f84c81ed5d09
children 0f22db71df7a
line wrap: on
line diff
--- a/src/lib-storage/index/dbox-common/dbox-storage.c	Tue Sep 08 18:49:00 2015 +0300
+++ b/src/lib-storage/index/dbox-common/dbox-storage.c	Tue Sep 08 19:07:02 2015 +0300
@@ -77,8 +77,7 @@
 		return;
 
 	/* unlink/create the current alt path symlink */
-	if (unlink(alt_symlink_path) < 0 && errno != ENOENT)
-		i_error("unlink(%s) failed: %m", alt_symlink_path);
+	i_unlink_if_exists(alt_symlink_path);
 	if (alt_path != NULL) {
 		if (symlink(alt_path, alt_symlink_path) < 0 &&
 		    errno != EEXIST) {