Skip to content
Snippets Groups Projects
Commit eeff908b authored by Yorhel's avatar Yorhel
Browse files

dir_export.c: Add timestamp to meta-data

parent b6e4092e
No related branches found
No related tags found
No related merge requests found
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <time.h>
static FILE *stream; static FILE *stream;
...@@ -132,8 +133,11 @@ static int item(struct dir *item) { ...@@ -132,8 +133,11 @@ static int item(struct dir *item) {
/* File header. /* File header.
* TODO: Add scan options? */ * TODO: Add scan options? */
if(!stack.top) if(!stack.top) {
fputs("[1,0,{\"progname\":\""PACKAGE"\",\"progver\":\""PACKAGE_VERSION"\"}", stream); fputs("[1,0,{\"progname\":\""PACKAGE"\",\"progver\":\""PACKAGE_VERSION"\",\"timestamp\":", stream);
output_int((uint64_t)time(NULL));
fputc('}', stream);
}
fputs(",\n", stream); fputs(",\n", stream);
if(item->flags & FF_DIR) if(item->flags & FF_DIR)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment