+ if (stat(upath, st) < 0) {
+ rc = AFPERR_MISC;
+ goto exit;
+ }
+
+ /* Remove it from the cache */
+ struct dir *cacheddir = dircache_search_by_did(vol, id);
+ if (cacheddir) {
+ LOG(log_warning, logtype_afpd,"Still cached: \"%s/%s\"", getcwdpath(), upath);
+ (void)dir_remove(vol, cacheddir);
+ }
+
+ /* Fixup adouble info */
+ if (!ad_metadata(upath, adflags, adp)) {
+ ad_setid(adp, st->st_dev, st->st_ino, id, curdir->d_did, vol->v_stamp);
+ ad_flush(adp);
+ ad_close_metadata(adp);
+ }