1
1

JSON import: accept fractional mtime values

For sub-second precision, if we ever want to add that.
Этот коммит содержится в:
Yorhel 2021-05-25 10:09:36 +02:00
родитель 67a1d84216
Коммит bd01f5773d

Просмотреть файл

@ -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));