mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 782351 - Device Storage - Expose sdcard/volume state flag on stat result followup. If fetching the available disk space fails (due to a path not existing), return zero bytes available. r=khuey
This commit is contained in:
parent
d51291d281
commit
a19ad5cd0d
@ -309,12 +309,10 @@ DeviceStorageRequestParent::StatFileEvent::CancelableRun()
|
||||
|
||||
nsCOMPtr<nsIRunnable> r;
|
||||
uint64_t diskUsage = DeviceStorageFile::DirectoryDiskUsage(mFile->mFile);
|
||||
int64_t freeSpace = 0;
|
||||
int64_t freeSpace;
|
||||
nsresult rv = mFile->mFile->GetDiskSpaceAvailable(&freeSpace);
|
||||
if (NS_FAILED(rv)) {
|
||||
r = new PostErrorEvent(mParent, POST_ERROR_EVENT_UNKNOWN);
|
||||
NS_DispatchToMainThread(r);
|
||||
return NS_OK;
|
||||
freeSpace = 0;
|
||||
}
|
||||
|
||||
r = new PostStatResultEvent(mParent, diskUsage, freeSpace);
|
||||
|
Loading…
Reference in New Issue
Block a user