Skip to content

Commit 3dcaed6

Browse files
committed
fix: support non-string filenames in read
1 parent fdeca4c commit 3dcaed6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

@xen-orchestra/fs/src/azure.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,10 @@ export default class AzureHandler extends RemoteHandlerAbstract {
248248
}
249249

250250
async _read(file, buffer, position = 0) {
251+
if (typeof file !== 'string') {
252+
file = file.fd
253+
}
251254
const blobClient = this.#containerClient.getBlobClient(file)
252-
253255
try {
254256
const downloadResponse = await blobClient.download(position, buffer.length)
255257
const bytesRead = await this.#streamToBuffer(downloadResponse.readableStreamBody, buffer)

0 commit comments

Comments
 (0)