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:
parent
680e415104
commit
06fa6934cb
1 changed files with 1 additions and 0 deletions
|
|
@ -277,6 +277,7 @@ static int readdir_copy_entry(
|
||||||
*dst_len -= info->NextEntryOffset;
|
*dst_len -= info->NextEntryOffset;
|
||||||
|
|
||||||
if (entry->attr_info.rdattr_error == NFS4ERR_MOVED) {
|
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;
|
/* look up attributes for referral entries, but ignore return value;
|
||||||
* it's okay if lookup fails, we'll just write garbage attributes */
|
* it's okay if lookup fails, we'll just write garbage attributes */
|
||||||
lookup_entry(args->root, args->state->session,
|
lookup_entry(args->root, args->state->session,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue