Commit 3fe1ca62 authored by Julian Rother's avatar Julian Rother

Fixed json_fileinfo to support filesizes > 4GB

parent ae02323f
......@@ -14,7 +14,7 @@ char *mprintf(const char *fmt, ...);
void *xmalloc(size_t size);
char *hashfile(char *path);
double fileduration(char *path);
size_t filesize(char *path);
off_t filesize(char *path);
char *json_fileinfo(char *path);
void overwrite_check(char *path, char *srcpath, char *srchash);
int checktime(time_t min);
......
......@@ -3,7 +3,7 @@
#include "../util.h"
size_t filesize(char *path)
off_t filesize(char *path)
{
struct stat s;
if (stat(path, &s))
......
......@@ -2,6 +2,6 @@
char *json_fileinfo(char *path)
{
return mprintf("\"hash\": \"%s\", \"duration\": %f, \"filesize\": %i",
return mprintf("\"hash\": \"%s\", \"duration\": %f, \"filesize\": %li",
hashfile(path), fileduration(path), filesize(path));
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment