]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/vfs/unix.c
Merge branch-2-1
[netatalk.git] / libatalk / vfs / unix.c
index 4812e96421ad49846bc501d042170ff332423bf0..a43794e139550b0a6513602e3b7d82684eb78874 100644 (file)
@@ -1,9 +1,6 @@
 /*
- * $Id: unix.c,v 1.11 2010-04-18 16:14:51 hat001 Exp $
- *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
- *
  */
 
 #ifdef HAVE_CONFIG_H
@@ -24,6 +21,7 @@
 #include <atalk/volume.h>
 #include <atalk/logger.h>
 #include <atalk/unix.h>
+#include <atalk/acl.h>
 
 /* -----------------------------
    a dropbox is a folder where w is set but not r eg:
@@ -214,7 +212,7 @@ int copy_file(int dirfd, const char *src, const char *dst, mode_t mode)
         return -1;
     }
 
-    if ((dfd = open(dst, O_WRONLY | O_CREAT | O_EXCL, mode)) < 0) {
+    if ((dfd = open(dst, O_WRONLY | O_CREAT | O_TRUNC, mode)) < 0) {
         LOG(log_error, logtype_afpd, "copy_file('%s'/'%s'): open '%s' error: %s",
             src, dst, dst, strerror(errno));
         ret = -1;