STABLE14-finder-and-tiger-cp-deal-with-dropboxes-20071024

FIXES 69363

this way copying finishes


(cherry picked from commit f814c8a9636b2939da9d0f17de4d71c6fd23ae6c)
This commit is contained in:
Chaskiel M Grundman 2007-10-24 06:33:16 +00:00 committed by Derrick Brashear
parent 17b341fffe
commit 110dc507db

View File

@ -634,12 +634,18 @@ afs_vop_access(ap)
/* we can't check for KAUTH_VNODE_TAKE_OWNERSHIP, so we always permit it */
code = afs_AccessOK(tvc, bits, &treq, cmb);
#if defined(AFS_DARWIN80_ENV)
/* In a dropbox, cp on 10.4 behaves badly, looping on EACCES */
/* In a dropbox, Finder may reopen the file. Let it. */
if (code == 0 && ((bits &~(PRSFS_READ|PRSFS_WRITE)) == 0)) {
code = afs_AccessOK(tvc, PRSFS_ADMINISTER|PRSFS_INSERT|bits, &treq, cmb);
}
#endif
if (code == 1 && vnode_vtype(ap->a_vp) == VREG &&
ap->a_action & KAUTH_VNODE_EXECUTE &&
(tvc->m.Mode & 0100) != 0100) {
code = 0;
}
}
if (code) {
code= 0; /* if access is ok */
} else {