summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2013-10-04 13:35:55 -0700
committerJeff Sharkey <jsharkey@android.com>2013-10-04 13:35:55 -0700
commitdfb6502136dc6683166f2104d93c22e1b72e1818 (patch)
treecd5867a2c0fab3f7e2a0332691fc077871b228d8
parent04c1c2afb7481e7fb9b66f96023c79d19cad8c90 (diff)
downloadandroid_packages_providers_DownloadProvider-dfb6502136dc6683166f2104d93c22e1b72e1818.zip
android_packages_providers_DownloadProvider-dfb6502136dc6683166f2104d93c22e1b72e1818.tar.gz
android_packages_providers_DownloadProvider-dfb6502136dc6683166f2104d93c22e1b72e1818.tar.bz2
Ensure Downloads directory exists before create.
Bug: 11080980 Change-Id: Iffa5402ae632ceda06e0aec6bdc73c0c4fcbeaa1
-rw-r--r--src/com/android/providers/downloads/DownloadStorageProvider.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/com/android/providers/downloads/DownloadStorageProvider.java b/src/com/android/providers/downloads/DownloadStorageProvider.java
index c32f745..d9a0aa6 100644
--- a/src/com/android/providers/downloads/DownloadStorageProvider.java
+++ b/src/com/android/providers/downloads/DownloadStorageProvider.java
@@ -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();