mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-13 01:08:41 -09:00
JSON import: accept fractional mtime values
For sub-second precision, if we ever want to add that.
This commit is contained in:
parent
67a1d84216
commit
bd01f5773d
1 changed files with 6 additions and 0 deletions
|
|
@ -465,6 +465,12 @@ static int iteminfo(void) {
|
|||
C(rint64(&iv, UINT64_MAX));
|
||||
ctx->buf_dir->flags |= FF_EXT;
|
||||
ctx->buf_ext->mtime = iv;
|
||||
// Accept decimal numbers, but discard the fractional part because our data model doesn't support it.
|
||||
if(*ctx->buf == '.') {
|
||||
con(1);
|
||||
while(*ctx->buf >= '0' && *ctx->buf <= '9')
|
||||
con(1);
|
||||
}
|
||||
} else if(strcmp(ctx->val, "hlnkc") == 0) { /* hlnkc */
|
||||
if(*ctx->buf == 't') {
|
||||
C(rlit("true", 4));
|
||||
|
|
|
|||
Loading…
Reference in a new issue