readdir: view broken referrals as directories

if readdir fails to look up a referred entry, set its type to NF4DIR so windows explorer shows it as a directory.  when you double-click on the directory, it gives a message saying that it "refers to a location that is unavailable"

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2010-10-12 09:53:20 -04:00
parent 680e415104
commit 06fa6934cb

View file

@ -277,6 +277,7 @@ static int readdir_copy_entry(
*dst_len -= info->NextEntryOffset;
if (entry->attr_info.rdattr_error == NFS4ERR_MOVED) {
entry->attr_info.type = NF4DIR; /* default to dir */
/* look up attributes for referral entries, but ignore return value;
* it's okay if lookup fails, we'll just write garbage attributes */
lookup_entry(args->root, args->state->session,