From ec71fa6c232c6a4ae353f9ec534cca0373c6266a Mon Sep 17 00:00:00 2001 From: agarcia Date: Thu, 3 Sep 2020 11:18:53 +0200 Subject: [PATCH] Create parent folder when downloading a file if possible --- .../android/lib/resources/files/DownloadRemoteFileOperation.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/DownloadRemoteFileOperation.kt b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/DownloadRemoteFileOperation.kt index c00ea76f..fddeb692 100644 --- a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/DownloadRemoteFileOperation.kt +++ b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/DownloadRemoteFileOperation.kt @@ -66,7 +66,7 @@ class DownloadRemoteFileOperation( // perform the download try { - tmpFile.mkdirs() + tmpFile.parentFile?.mkdirs() result = downloadFile(client, tmpFile) Timber.i("Download of $remotePath to $tmpPath: ${result.logMessage}") } catch (e: Exception) {