changeset 18936:e8e838cb9663

lib-fs: fs_copy*() didn't update metadata_changed correctly. It was supposed to be (only) set when the copying actually finished.
author Timo Sirainen <tss@iki.fi>
date Sun, 16 Aug 2015 13:14:11 +0200
parents 2f1378beeef6
children f04240346fa0
files src/lib-fs/fs-api.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-fs/fs-api.c	Sun Aug 16 13:10:48 2015 +0200
+++ b/src/lib-fs/fs-api.c	Sun Aug 16 13:14:11 2015 +0200
@@ -761,7 +761,7 @@
 	T_BEGIN {
 		ret = src->fs->v.copy(src, dest);
 	} T_END;
-	if (ret < 0 || errno != EAGAIN)
+	if (!(ret < 0 && errno == EAGAIN))
 		dest->metadata_changed = FALSE;
 	return ret;
 }
@@ -773,7 +773,7 @@
 	T_BEGIN {
 		ret = dest->fs->v.copy(NULL, dest);
 	} T_END;
-	if (ret < 0 || errno != EAGAIN)
+	if (!(ret < 0 && errno == EAGAIN))
 		dest->metadata_changed = FALSE;
 	return ret;
 }