Skip to content

Commit 4158b96

Browse files
alperozturk96backportbot[bot]
authored andcommitted
use filename
Signed-off-by: alperozturk <[email protected]>
1 parent c9407db commit 4158b96

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Diff for: app/src/main/java/com/owncloud/android/operations/SynchronizeFileOperation.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -302,18 +302,17 @@ private void requestForUpload(OCFile file) {
302302

303303
private void requestForDownload(OCFile file) {
304304
final var fileDownloadHelper = FileDownloadHelper.Companion.instance();
305-
305+
String filename = file.getFileName();
306+
306307
if (syncInBackgroundWorker) {
307-
Log_OC.d(TAG, "downloading file without notification: " + file.getFileName());
308+
Log_OC.d(TAG, "downloading file without notification: " + filename);
308309

309310
try {
310311
final var operation = new DownloadFileOperation(mUser, file, mContext);
311312
var result = operation.execute(getClient());
312313

313314
mTransferWasRequested = true;
314315

315-
String filename = file.getFileName();
316-
317316
if (result.isSuccess()) {
318317
fileDownloadHelper.saveFile(file, operation, getStorageManager());
319318
Log_OC.d(TAG, "requestForDownload completed for: " + filename);
@@ -324,7 +323,7 @@ private void requestForDownload(OCFile file) {
324323
Log_OC.d(TAG, "Exception caught at requestForDownload" + e);
325324
}
326325
} else {
327-
Log_OC.d(TAG, "downloading file with notification: " + file.getFileName());
326+
Log_OC.d(TAG, "downloading file with notification: " + filename);
328327
mTransferWasRequested = true;
329328
fileDownloadHelper.downloadFile(mUser, file);
330329
}

0 commit comments

Comments
 (0)