Thu, 07 Sep 2017 18:42:51 +0200
bug fix: file size > 2gb not loaded correctly from database
this bug results in large files always pushed, even if they are unmodified
dav/db.c | file | annotate | diff | comparison | revisions |
--- a/dav/db.c Thu Sep 07 18:18:30 2017 +0200 +++ b/dav/db.c Thu Sep 07 18:42:51 2017 +0200 @@ -152,7 +152,13 @@ break; } case 3: { - res->size = atoi((char*)value); + res->size = 0; + int64_t filelen = 0; + if(util_strtoint((char*)value, &filelen)) { + if(filelen > 0) { + res->size = (size_t)filelen; + } + } break; } }