summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/providers/downloads/DownloadStorageProvider.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/providers/downloads/DownloadStorageProvider.java b/src/com/android/providers/downloads/DownloadStorageProvider.java
index d9a0aa6..ecef54e 100644
--- a/src/com/android/providers/downloads/DownloadStorageProvider.java
+++ b/src/com/android/providers/downloads/DownloadStorageProvider.java
@@ -104,6 +104,10 @@ public class DownloadStorageProvider extends DocumentsProvider {
@Override
public String createDocument(String docId, String mimeType, String displayName)
throws FileNotFoundException {
+ if (Document.MIME_TYPE_DIR.equals(mimeType)) {
+ throw new FileNotFoundException("Directory creation not supported");
+ }
+
final File parent = Environment.getExternalStoragePublicDirectory(
Environment.DIRECTORY_DOWNLOADS);
parent.mkdirs();