]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/vfs/ea_ad.c
Redesign ad_open API to only use one arg for all flags, fix locking for adouble:v2
[netatalk.git] / libatalk / vfs / ea_ad.c
index 9f369ea4fb3506036ba204d10080a5d26a016474..7394e84c9de6abe18af824ed6ccf374a3809bf81 100644 (file)
@@ -1398,7 +1398,7 @@ int ea_renamefile(VFS_FUNC_ARGS_RENAMEFILE)
         if (errno == ENOENT) {
             /* Possibly the .AppleDouble folder didn't exist, we create it and try again */
             ad_init(&ad, vol->v_adouble, vol->v_ad_options); 
-            if ((ad_open(&ad, dst, ADFLAGS_HF, O_RDWR | O_CREAT, 0666)) != 0) {
+            if ((ad_open(&ad, dst, ADFLAGS_HF | ADFLAGS_RDWR | ADFLAGS_CREATE, 0666)) != 0) {
                 LOG(log_error, logtype_afpd, "ea_renamefile('%s/%s'): ad_open error: '%s'", src, dst, dst);
                 ret = AFPERR_MISC;
                 goto exit;
@@ -1495,7 +1495,7 @@ int ea_copyfile(VFS_FUNC_ARGS_COPYFILE)
         if (errno == ENOENT) {
             /* Possibly the .AppleDouble folder didn't exist, we create it and try again */
             ad_init(&ad, vol->v_adouble, vol->v_ad_options); 
-            if ((ad_open(&ad, dst, ADFLAGS_HF, O_RDWR | O_CREAT, 0666)) != 0) {
+            if ((ad_open(&ad, dst, ADFLAGS_HF | ADFLAGS_RDWR | ADFLAGS_CREATE, 0666)) != 0) {
                 LOG(log_error, logtype_afpd, "ea_copyfile('%s/%s'): ad_open error: '%s'", src, dst, dst);
                 ret = AFPERR_MISC;
                 goto exit;