+ /* get basename */
+
+ /* build src path to ._ file*/
+ EC_NULL(dup1 = strdup(src));
+ EC_NULL(name = basename(strdup(dup1)));
+
+ EC_NULL(dup2 = strdup(src));
+ EC_NULL(dir = dirname(dup2));
+ EC_NULL(s = bfromcstr(dir));
+ EC_ZERO(bcatcstr(s, "/._"));
+ EC_ZERO(bcatcstr(s, name));
+
+ /* build dst path to ._file*/
+ EC_NULL(dup4 = strdup(dst));
+ EC_NULL(name = basename(strdup(dup4)));
+
+ EC_NULL(dup3 = strdup(dst));
+ EC_NULL(dir = dirname(dup3));
+ EC_NULL(d = bfromcstr(dir));
+ EC_ZERO(bcatcstr(d, "/._"));
+ EC_ZERO(bcatcstr(d, name));
+
+ if (copy_file(sfd, cfrombstr(s), cfrombstr(d), 0666) != 0) {
+ switch (errno) {
+ case ENOENT:
+ break;
+ default:
+ LOG(log_error, logtype_afpd, "[VFS] copyfile(\"%s\" -> \"%s\"): %s",
+ cfrombstr(s), cfrombstr(d), strerror(errno));
+ EC_FAIL;
+
+ }
+ }