Skip to content

Commit ed05918

Browse files
author
Julian Kast
committed
code review suggestions
1 parent 0f9e1ce commit ed05918

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

base/src/main/java/com/smartdevicelink/managers/file/DeleteFileOperation.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,12 @@ private void start() {
7070
if (getState() == Task.CANCELED) {
7171
return;
7272
}
73-
if (!mutableRemoteFileNames.contains(fileName) && completionListener != null) {
74-
String errorMessage = "File to delete is no longer on the head unit, aborting operation";
75-
// Returning BaseFileManager.SPACE_AVAILABLE_MAX_VALUE for bytesAvaialble as a placeHolder, it will not get updated in BaseFileManager as long as success returned is false.
76-
completionListener.onComplete(false, BaseFileManager.SPACE_AVAILABLE_MAX_VALUE, mutableRemoteFileNames, errorMessage);
73+
if (!mutableRemoteFileNames.contains(fileName)) {
74+
if (completionListener != null) {
75+
String errorMessage = "File to delete is no longer on the head unit, aborting operation";
76+
// Returning BaseFileManager.SPACE_AVAILABLE_MAX_VALUE for bytesAvaialble as a placeHolder, it will not get updated in BaseFileManager as long as success returned is false.
77+
completionListener.onComplete(false, BaseFileManager.SPACE_AVAILABLE_MAX_VALUE, mutableRemoteFileNames, errorMessage);
78+
}
7779
onFinished();
7880
return;
7981
}

0 commit comments

Comments
 (0)