Permalink
Browse files

Ensure data directory exists before uninstalling

  • Loading branch information...
Dale Harvey
Dale Harvey committed Jun 17, 2011
1 parent 057137d commit d628c1d8a8f3fd7aae93a4f362f1b82ac3288c6b
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/com/couchbase/libcouch/CouchInstaller.java
@@ -92,6 +92,12 @@ private static void installPackage(String baseUrl, String pkg, Handler handler)
Map<String, String> allInstalledFileTypes = new HashMap<String, String>();
Map<String, String> allInstalledLinks = new HashMap<String, String>();
+ // Ensure /sdcard/Android/data/com.my.app exists
+ File externalPath = new File(externalPath() + "/");
+ if (!externalPath.exists()) {
+ externalPath.mkdirs();
+ }
+
if (status.getStatusCode() == 200) {
HttpEntity entity = response.getEntity();
InputStream instream = entity.getContent();

0 comments on commit d628c1d

Please sign in to comment.