Bug 991977 - Ensure volume is mounted before starting download. r=dhylands

This commit is contained in:
Hansu Kim 2014-04-23 17:50:00 -04:00
parent 014fa4c392
commit 96648b485e

View File

@ -284,10 +284,7 @@ this.DownloadIntegration = {
// Now get the path for this storage area.
if (preferredStorageName) {
let volume = volumeService.getVolumeByName(preferredStorageName);
if (volume &&
volume.isMediaPresent &&
!volume.isMountLocked &&
!volume.isSharing) {
if (volume && volume.state === Ci.nsIVolume.STATE_MOUNTED){
directoryPath = OS.Path.join(volume.mountPoint, "downloads");
yield OS.File.makeDir(directoryPath, { ignoreExisting: true });
}