]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/vfs/vfs.c
Various fixes for adouble:v2
[netatalk.git] / libatalk / vfs / vfs.c
index 57d64ba1ae5294e601c2b118bdaf7b6a93c0e46f..2d150cc40da96e7c456fe909ce37d98cc0596643 100644 (file)
@@ -295,8 +295,6 @@ static int RF_renamefile_adouble(VFS_FUNC_ARGS_RENAMEFILE)
 static int RF_copyfile_adouble(VFS_FUNC_ARGS_COPYFILE)
 /* const struct vol *vol, int sfd, const char *src, const char *dst */
 {
-    return 0;
-#if 0
     EC_INIT;
     bstring s = NULL, d = NULL;
     char *dup1 = NULL;
@@ -341,7 +339,10 @@ static int RF_copyfile_adouble(VFS_FUNC_ARGS_COPYFILE)
         EC_ZERO(bcatcstr(d, name));
     }
 
-    EC_ZERO(copy_file(sfd, cfrombstr(s), cfrombstr(d), 0666));
+    /* ignore errors */
+    if (copy_file(sfd, cfrombstr(s), cfrombstr(d), 0666) != 0)
+        if (errno != ENOENT)
+            EC_FAIL;
 
 EC_CLEANUP:
     bdestroy(s);
@@ -352,7 +353,6 @@ EC_CLEANUP:
     if (dup4) free(dup4);
 
     EC_EXIT;
-#endif
 }
 
 #ifdef HAVE_SOLARIS_ACLS
@@ -580,6 +580,7 @@ static int RF_deletefile_ea(VFS_FUNC_ARGS_DELETEFILE)
 }
 static int RF_copyfile_ea(VFS_FUNC_ARGS_COPYFILE)
 {
+    /* the EA VFS module does this all for us */
     return 0;
 #if 0
     EC_INIT;