codacy: combine statements

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2019-04-11 14:43:25 +02:00
parent a34761ba3a
commit 35ff763950
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -758,10 +758,8 @@ public class FileDataStorageManager {
if (localFile.exists()) {
File targetFile = new File(defaultSavePath + targetPath);
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());
}
copied = FileStorageUtils.copyFile(localFile, targetFile);
}