fix: avoid reading files when the size is empty (#134)
* fix: avoid reading files when the size is empty * also use stat.size for checking if it is modified * bump minor version number * Don't push empty chunks into the array (creates faster reads) * reverted back to avoid making a if check
This commit is contained in:
@@ -189,6 +189,12 @@ promise_test(async () => {
|
||||
assert_equals(await (await fileFrom('./LICENSE')).text(), license.toString())
|
||||
}, 'blob part backed up by filesystem slice correctly')
|
||||
|
||||
promise_test(async () => {
|
||||
fs.writeFileSync('temp', '')
|
||||
await blobFromSync('./temp').text()
|
||||
fs.unlinkSync('./temp')
|
||||
}, 'can read empty files')
|
||||
|
||||
test(async () => {
|
||||
const blob = blobFromSync('./LICENSE')
|
||||
await new Promise(resolve => setTimeout(resolve, 2000))
|
||||
|
||||
Reference in New Issue
Block a user