]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/vfs/unix.c
Merge from branch-2-1
[netatalk.git] / libatalk / vfs / unix.c
index d0ea31282351be18c23cec8bd7d9f407c00120fd..a43794e139550b0a6513602e3b7d82684eb78874 100644 (file)
@@ -1,9 +1,6 @@
 /*
- * $Id: unix.c,v 1.10 2010-03-12 15:16:49 franklahm Exp $
- *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
- *
  */
 
 #ifdef HAVE_CONFIG_H
@@ -12,6 +9,7 @@
 
 #include <unistd.h>
 #include <errno.h>
+#include <stdlib.h>
 #include <sys/param.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -23,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:
@@ -213,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;