repositories
/
deb_libnfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cdb19ec
)
From Paul van der Zwan
author
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Sun, 19 Jun 2011 15:02:48 +0000
(
01:02
+1000)
committer
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Sun, 19 Jun 2011 15:02:48 +0000
(
01:02
+1000)
Set the directory bit in st_mode properly.
lib/libnfs.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/libnfs.c
b/lib/libnfs.c
index c637a7518f172d696ed63b4d54f9df62333280b6..905e9d80656ca99e38c567d50da6211a70f7a3b7 100644
(file)
--- a/
lib/libnfs.c
+++ b/
lib/libnfs.c
@@
-646,6
+646,9
@@
static void nfs_stat_1_cb(struct rpc_context *rpc _U_, int status, void *command
st.st_dev = -1;
st.st_ino = res->GETATTR3res_u.resok.obj_attributes.fileid;
st.st_mode = res->GETATTR3res_u.resok.obj_attributes.mode;
+ if (res->GETATTR3res_u.resok.obj_attributes.type == NF3DIR) {
+ st.st_mode |= S_IFDIR ;
+ }
st.st_nlink = res->GETATTR3res_u.resok.obj_attributes.nlink;
st.st_uid = res->GETATTR3res_u.resok.obj_attributes.uid;
st.st_gid = res->GETATTR3res_u.resok.obj_attributes.gid;