JSON import: accept fractional mtime values
For sub-second precision, if we ever want to add that.
Этот коммит содержится в:
родитель
67a1d84216
Коммит
bd01f5773d
@ -465,6 +465,12 @@ static int iteminfo(void) {
|
|||||||
C(rint64(&iv, UINT64_MAX));
|
C(rint64(&iv, UINT64_MAX));
|
||||||
ctx->buf_dir->flags |= FF_EXT;
|
ctx->buf_dir->flags |= FF_EXT;
|
||||||
ctx->buf_ext->mtime = iv;
|
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 */
|
} else if(strcmp(ctx->val, "hlnkc") == 0) { /* hlnkc */
|
||||||
if(*ctx->buf == 't') {
|
if(*ctx->buf == 't') {
|
||||||
C(rlit("true", 4));
|
C(rlit("true", 4));
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user