From fb9f4a67b4929b6662630eaf05846aad6c6b3833 Mon Sep 17 00:00:00 2001 From: fyears <1142836+fyears@users.noreply.github.com> Date: Fri, 24 May 2024 23:11:01 +0800 Subject: [PATCH] fix size bug --- src/sync.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sync.ts b/src/sync.ts index 7146c16..9762be5 100644 --- a/src/sync.ts +++ b/src/sync.ts @@ -986,7 +986,8 @@ async function copyFile( const statsLeft = await left.stat(key); const content = await left.readFile(key); - if (statsLeft.size === undefined) { + if (statsLeft.size === undefined || statsLeft.size === 0) { + // some weird bugs on android not returning size. just ignore them statsLeft.size = content.byteLength; } else { if (statsLeft.size !== content.byteLength) {