mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 05:27:44 +00:00
DEVEL15-fakestat-access-for-nautilus-20080307
LICENSE IPL10 in order that nautilus' .directory checks can work without stat()ing every damn thing, do what we do for the mac, basically. (cherry picked from commit f637b6292d3723cd2cf672ecaba6f179813ab64b)
This commit is contained in:
parent
6ad80c9afa
commit
ccd454443f
@ -209,7 +209,16 @@ afs_access(OSI_VC_DECL(avc), register afs_int32 amode,
|
||||
if ((code = afs_InitReq(&treq, acred)))
|
||||
return code;
|
||||
|
||||
code = afs_EvalFakeStat(&avc, &fakestate, &treq);
|
||||
if (afs_fakestat_enable && avc->mvstat == 1) {
|
||||
code = afs_TryEvalFakeStat(&avc, &fakestate, &treq);
|
||||
if (code == 0 && avc->mvstat == 1) {
|
||||
afs_PutFakeStat(&fakestate);
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
code = afs_EvalFakeStat(&avc, &fakestate, &treq);
|
||||
}
|
||||
|
||||
if (code) {
|
||||
afs_PutFakeStat(&fakestate);
|
||||
return code;
|
||||
|
@ -1228,6 +1228,11 @@ afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, struct AFS_UCRED
|
||||
ndp->ni_dvp = AFSTOV(adp);
|
||||
#endif /* AFS_OSF_ENV */
|
||||
|
||||
if (afs_fakestat_enable && adp->mvstat == 1) {
|
||||
if (strcmp(aname, ".directory") == 0)
|
||||
tryEvalOnly = 1;
|
||||
}
|
||||
|
||||
#if defined(AFS_DARWIN_ENV)
|
||||
/* Workaround for MacOSX Finder, which tries to look for
|
||||
* .DS_Store and Contents under every directory.
|
||||
|
Loading…
x
Reference in New Issue
Block a user