Skip to content

Commit

Permalink
Merge pull request #530 from Infomaniak/Handle-Major-code-smells-on-S…
Browse files Browse the repository at this point in the history
…onarCloud

Handled `Major` code smells on SonarCloud
  • Loading branch information
JorisBodin authored Feb 9, 2022
2 parents b340f0a + a52549f commit 11a83c2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ open class UploadFile(
} else {
// Delete definitively
val uri = uploadFileRealm.getUriObject()
if (uri.scheme.equals(ContentResolver.SCHEME_FILE)) {
if (!uploadFile.isSyncOffline()) uri.toFile().apply { if (exists()) delete() }
if (uri.scheme.equals(ContentResolver.SCHEME_FILE) && !uploadFile.isSyncOffline()) {
uri.toFile().apply { if (exists()) delete() }
}
uploadFileRealm.deleteFromRealm()
}
Expand Down

0 comments on commit 11a83c2

Please sign in to comment.