зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1385402 - Cloud Storage API - Handle null while getting download folder r=Gijs
MozReview-Commit-ID: C9HC4KSAuG4 --HG-- extra : rebase_source : adb931f313e5ed33691eacd6bcd0312a8302f07c
This commit is contained in:
Родитель
e5f4b87998
Коммит
9cb48aea09
|
@ -398,6 +398,7 @@ var CloudStorageInternal = {
|
|||
* type of data downloaded, options are 'default', 'screenshot'
|
||||
* default value is 'default'
|
||||
* @return {Promise} which resolves to full path to download folder
|
||||
* Resolves null if a valid download folder is not found.
|
||||
*/
|
||||
async getDownloadFolder(dataType = "default") {
|
||||
// Wait for cloudstorage to initialize if providers metadata is not available
|
||||
|
|
|
@ -316,8 +316,8 @@ this.DownloadIntegration = {
|
|||
case 3: // Cloud Storage
|
||||
try {
|
||||
directoryPath = await CloudStorage.getDownloadFolder();
|
||||
} catch(ex) {
|
||||
// Either the preference isn't set or the directory cannot be created.
|
||||
} catch(ex) {}
|
||||
if (!directoryPath) {
|
||||
directoryPath = await this.getSystemDownloadsDirectory();
|
||||
}
|
||||
break;
|
||||
|
|
Загрузка…
Ссылка в новой задаче