Unify_unify(): made it work also when destination file does not exist (needed for...
[util-vserver.git] / util-vserver / lib_internal / unify-deunify.c
index a942aab..fe4bd1e 100644 (file)
@@ -34,8 +34,7 @@
 #include <wrappers.h>
 
 bool
-Unify_deUnify(char const UNUSED *src, struct stat const UNUSED *src_stat,
-             char const *dst,        struct stat const UNUSED *dst_stat)
+Unify_deUnify(char const *dst)
 {
   size_t               l = strlen(dst);
   char                 tmpfile[l + sizeof(";XXXXXX")];
@@ -82,7 +81,7 @@ Unify_deUnify(char const UNUSED *src, struct stat const UNUSED *src_stat,
     }
     if (len==0) break;
 
-    if (!WwriteAll(fd_tmp, buf, len)) goto err;
+    if (!WwriteAll(fd_tmp, buf, len, 0)) goto err;
   }
 
   if (close(fd_src)==-1) {