mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 877952 - 'IndexedDB upgrade should proceed even when file manager directories are not present'. r=janv.
This commit is contained in:
parent
ea32d76a43
commit
eec02b64f8
@ -385,12 +385,23 @@ FileManager::InitDirectory(nsIFile* aDirectory,
|
||||
nsresult
|
||||
FileManager::GetUsage(nsIFile* aDirectory, uint64_t* aUsage)
|
||||
{
|
||||
uint64_t usage = 0;
|
||||
NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
|
||||
|
||||
bool exists;
|
||||
nsresult rv = aDirectory->Exists(&exists);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (!exists) {
|
||||
*aUsage = 0;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsISimpleEnumerator> entries;
|
||||
nsresult rv = aDirectory->GetDirectoryEntries(getter_AddRefs(entries));
|
||||
rv = aDirectory->GetDirectoryEntries(getter_AddRefs(entries));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
uint64_t usage = 0;
|
||||
|
||||
bool hasMore;
|
||||
while (NS_SUCCEEDED((rv = entries->HasMoreElements(&hasMore))) && hasMore) {
|
||||
nsCOMPtr<nsISupports> entry;
|
||||
|
Loading…
Reference in New Issue
Block a user