mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-13 01:08:41 -09:00
dir_export.c: Add timestamp to meta-data
This commit is contained in:
parent
b6e4092ea7
commit
eeff908b0c
1 changed files with 6 additions and 2 deletions
|
|
@ -28,6 +28,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
|
||||
static FILE *stream;
|
||||
|
|
@ -132,8 +133,11 @@ static int item(struct dir *item) {
|
|||
|
||||
/* File header.
|
||||
* TODO: Add scan options? */
|
||||
if(!stack.top)
|
||||
fputs("[1,0,{\"progname\":\""PACKAGE"\",\"progver\":\""PACKAGE_VERSION"\"}", stream);
|
||||
if(!stack.top) {
|
||||
fputs("[1,0,{\"progname\":\""PACKAGE"\",\"progver\":\""PACKAGE_VERSION"\",\"timestamp\":", stream);
|
||||
output_int((uint64_t)time(NULL));
|
||||
fputc('}', stream);
|
||||
}
|
||||
|
||||
fputs(",\n", stream);
|
||||
if(item->flags & FF_DIR)
|
||||
|
|
|
|||
Loading…
Reference in a new issue