Ensure Downloads directory exists before create.
Jeff Sharkey [Fri, 4 Oct 2013 20:35:55 +0000 (13:35 -0700)]
Bug: 11080980
Change-Id: Iffa5402ae632ceda06e0aec6bdc73c0c4fcbeaa1

src/com/android/providers/downloads/DownloadStorageProvider.java

index c32f745..d9a0aa6 100644 (file)
@@ -106,6 +106,7 @@ public class DownloadStorageProvider extends DocumentsProvider {
             throws FileNotFoundException {
         final File parent = Environment.getExternalStoragePublicDirectory(
                 Environment.DIRECTORY_DOWNLOADS);
+        parent.mkdirs();
 
         // Delegate to real provider
         final long token = Binder.clearCallingIdentity();