dav/finfo.c

changeset 736
40be8db6fe45
parent 646
37a8bfae995e
child 747
efbd59642577
equal deleted inserted replaced
735:74a6e2d4fb1f 736:40be8db6fe45
99 99
100 if((finfo & FINFO_MTIME) == FINFO_MTIME) { 100 if((finfo & FINFO_MTIME) == FINFO_MTIME) {
101 char str[32]; 101 char str[32];
102 struct tm *date = gmtime(&s->st_mtime); 102 struct tm *date = gmtime(&s->st_mtime);
103 strftime(str, 32, "%a, %d %b %Y %H:%M:%S GMT", date); 103 strftime(str, 32, "%a, %d %b %Y %H:%M:%S GMT", date);
104 DavXmlNode *mtime = dav_xml_createnode_with_text(DAV_PROPS_NS, "mtime", str); 104 DavXmlNode *mtime = dav_text_element(res->session, DAV_PROPS_NS, "mtime", str);
105 content = mtime; 105 content = mtime;
106 last = mtime; 106 last = mtime;
107 } 107 }
108 #ifndef _WIN32 108 #ifndef _WIN32
109 if((finfo & FINFO_OWNER) == FINFO_OWNER) { 109 if((finfo & FINFO_OWNER) == FINFO_OWNER) {
111 } 111 }
112 if((finfo & FINFO_MODE) == FINFO_MODE) { 112 if((finfo & FINFO_MODE) == FINFO_MODE) {
113 mode_t mode = s->st_mode & 07777; 113 mode_t mode = s->st_mode & 07777;
114 char str[32]; 114 char str[32];
115 snprintf(str, 32, "%o", (int)mode); 115 snprintf(str, 32, "%o", (int)mode);
116 DavXmlNode *xmode = dav_xml_createnode_with_text(DAV_PROPS_NS, "mode", str); 116 DavXmlNode *xmode = dav_text_element(res->session, DAV_PROPS_NS, "mode", str);
117 if(last) { 117 if(last) {
118 last->next = xmode; 118 last->next = xmode;
119 } else { 119 } else {
120 content = xmode; 120 content = xmode;
121 } 121 }

mercurial