forked from joltup/rn-fetch-blob
-
Notifications
You must be signed in to change notification settings - Fork 157
Open
Description
Hello,
After upgrading to 0.22.1 I noticed that there is an issue with returning data from ReactNativeBlobUtil.df
on windows.
I'm calling this method const availableDiskSpace = await ReactNativeBlobUtil.fs.df();
but instead of information about storage the error is thrown with message {"code":"EUNSPECIFIED"}
After checking the df method code I noticed that on windows the storage info is populated in err argument
function df(): Promise<{ free: number, total: number }> {
return new Promise((resolve, reject) => {
ReactNativeBlobUtil.df((err, stat) => {
console.log(err, stat) // the err argument contains [{"free": 123, "total": 1234}] and stat is undefined
if (err)
reject(addCode('EUNSPECIFIED', new Error(err)));
else
resolve(stat);
});
});
}
Calling the same method on android works fine - err is null and stat contains storage info
Metadata
Metadata
Assignees
Labels
No labels