combine statements

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2019-04-10 17:25:45 +02:00
parent d19b7742d6
commit 2ea4b352e3
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -727,10 +727,8 @@ public class FileDataStorageManager {
if (localFile.exists()) {
File targetFile = new File(targetLocalPath);
File targetFolder = targetFile.getParentFile();
if (!targetFolder.exists()) {
if (!targetFolder.mkdirs()) {
Log_OC.e(TAG, "Unable to create parent folder " + targetFolder.getAbsolutePath());
}
if (!targetFolder.exists() && !targetFolder.mkdirs()) {
Log_OC.e(TAG, "Unable to create parent folder " + targetFolder.getAbsolutePath());
}
renamed = localFile.renameTo(targetFile);
}