File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -242,6 +242,9 @@ export default class AzureHandler extends RemoteHandlerAbstract {
242
242
}
243
243
244
244
async _getSize ( file ) {
245
+ if ( typeof file !== 'string' ) {
246
+ file = file . fd
247
+ }
245
248
const blobClient = this . #containerClient. getBlobClient ( file )
246
249
const properties = await blobClient . getProperties ( )
247
250
return properties . contentLength
@@ -254,6 +257,10 @@ export default class AzureHandler extends RemoteHandlerAbstract {
254
257
try {
255
258
const blobClient = this . #containerClient. getBlobClient ( file )
256
259
const blobSize = ( await blobClient . getProperties ( ) ) . contentLength
260
+ if ( blobSize === 0 ) {
261
+ console . warn ( `Blob is empty: ${ file } ` )
262
+ return { bytesRead : 0 , buffer }
263
+ }
257
264
if ( position >= blobSize ) {
258
265
throw new Error ( `Requested range starts beyond blob size: ${ blobSize } ` )
259
266
}
You can’t perform that action at this time.
0 commit comments