dont crash when there are no candidates to open file
[pub/Android/ownCloud.git] / src / eu / alefzero / owncloud / files / services / FileDownloader.java
index a5ee28f..ed865b7 100644 (file)
@@ -130,6 +130,7 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis
         File sdCard = Environment.getExternalStorageDirectory();\r
         File file = new File(sdCard.getAbsolutePath() + "/owncloud/" + mAccount.name + mFilePath);\r
         try {\r
+            file.getParentFile().mkdirs();\r
             file.createNewFile();\r
         } catch (IOException e) {\r
             e.printStackTrace();\r