Remove property creationdate

This commit is contained in:
wbaumann 2014-03-22 19:04:00 +00:00
parent 79f240d2ac
commit 77d51ac385
4 changed files with 5 additions and 24 deletions

View File

@ -1,6 +1,10 @@
ChangeLog for davfs2 ChangeLog for davfs2
-------------------- --------------------


2014-03-22 Werner Baumann (werner.baumann@onlinehome.de)
* cache.c, webdav.c, webdav.h:
Remove property creationdate.

2014-03-15 Werner Baumann (werner.baumann@onlinehome.de) 2014-03-15 Werner Baumann (werner.baumann@onlinehome.de)
* Document option "use_compression". * Document option "use_compression".



View File

@ -1523,11 +1523,7 @@ add_node(dav_node *parent, dav_props *props)
node->smtime = props->mtime; node->smtime = props->mtime;
if (node->smtime > 0) if (node->smtime > 0)
node->mtime = node->smtime; node->mtime = node->smtime;
if (props->ctime > 0) { node->ctime = node->mtime;
node->ctime = props->ctime;
} else {
node->ctime = node->mtime;
}


free(props); free(props);
if (debug) if (debug)
@ -2083,8 +2079,6 @@ update_directory(dav_node *dir, time_t refresh)
changed = 1; changed = 1;
} else { } else {
dir->mtime = props->mtime; dir->mtime = props->mtime;
if (props->ctime > dir->ctime)
dir->ctime = props->ctime;
if (dir->mtime > dir->ctime) if (dir->mtime > dir->ctime)
dir->ctime = dir->mtime; dir->ctime = dir->mtime;
if (dir->etag) if (dir->etag)
@ -2187,8 +2181,6 @@ update_node(dav_node *node, dav_props *props)
node->utime = 0; node->utime = 0;
delete_cache_file(node); delete_cache_file(node);
} }
if (props->ctime > node->ctime)
node->ctime = props->ctime;


if (node->etag) if (node->etag)
free(node->etag); free(node->etag);

View File

@ -116,7 +116,6 @@ typedef struct {
enum { enum {
ETAG = 0, ETAG = 0,
LENGTH, LENGTH,
CREATION,
MODIFIED, MODIFIED,
TYPE, TYPE,
END END
@ -125,7 +124,6 @@ enum {
static const ne_propname prop_names[] = { static const ne_propname prop_names[] = {
[ETAG] = {"DAV:", "getetag"}, [ETAG] = {"DAV:", "getetag"},
[LENGTH] = {"DAV:", "getcontentlength"}, [LENGTH] = {"DAV:", "getcontentlength"},
[CREATION] ={"DAV:", "creationdate"},
[MODIFIED] = {"DAV:", "getlastmodified"}, [MODIFIED] = {"DAV:", "getlastmodified"},
[TYPE] = {"DAV:", "resourcetype"}, [TYPE] = {"DAV:", "resourcetype"},
[END] = {NULL, NULL} [END] = {NULL, NULL}
@ -134,7 +132,6 @@ static const ne_propname prop_names[] = {
static const ne_propname anonymous_prop_names[] = { static const ne_propname anonymous_prop_names[] = {
[ETAG] = {NULL, "getetag"}, [ETAG] = {NULL, "getetag"},
[LENGTH] = {NULL, "getcontentlength"}, [LENGTH] = {NULL, "getcontentlength"},
[CREATION] ={NULL, "creationdate"},
[MODIFIED] = {NULL, "getlastmodified"}, [MODIFIED] = {NULL, "getlastmodified"},
[TYPE] = {NULL, "resourcetype"}, [TYPE] = {NULL, "resourcetype"},
[END] = {NULL, NULL} [END] = {NULL, NULL}
@ -1646,17 +1643,6 @@ prop_result(void *userdata, const ne_uri *uri, const ne_prop_result_set *set)
result->size = strtol(data, NULL, 10); result->size = strtol(data, NULL, 10);
#endif /* _FILE_OFFSET_BITS != 64 */ #endif /* _FILE_OFFSET_BITS != 64 */


data = ne_propset_value(set, &prop_names[CREATION]);
if (!data)
data = ne_propset_value(set, &anonymous_prop_names[CREATION]);
if (data) {
result->ctime = ne_iso8601_parse(data);
if (result->ctime == (time_t) -1)
result->ctime = ne_httpdate_parse(data);
if (result->ctime == (time_t) -1)
result->ctime = 0;
}

data = ne_propset_value(set, &prop_names[MODIFIED]); data = ne_propset_value(set, &prop_names[MODIFIED]);
if (!data) if (!data)
data = ne_propset_value(set, &anonymous_prop_names[MODIFIED]); data = ne_propset_value(set, &anonymous_prop_names[MODIFIED]);

View File

@ -36,7 +36,6 @@ struct dav_props {
char *etag; /* The etag string, including quotation characters, char *etag; /* The etag string, including quotation characters,
but without the mark for weak etags. */ but without the mark for weak etags. */
off_t size; /* File size in bytes (regular files only). */ off_t size; /* File size in bytes (regular files only). */
time_t ctime; /* Creation date. */
time_t mtime; /* Date of last modification. */ time_t mtime; /* Date of last modification. */
int is_dir; /* Boolean; 1 if a directory. */ int is_dir; /* Boolean; 1 if a directory. */
dav_props *next; /* Next in the list. */ dav_props *next; /* Next in the list. */