fix size bug

This commit is contained in:
fyears 2024-05-24 23:11:01 +08:00
parent 26a426dda8
commit fb9f4a67b4

View File

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