@@ -302,18 +302,17 @@ private void requestForUpload(OCFile file) {
302
302
303
303
private void requestForDownload (OCFile file ) {
304
304
final var fileDownloadHelper = FileDownloadHelper .Companion .instance ();
305
-
305
+ String filename = file .getFileName ();
306
+
306
307
if (syncInBackgroundWorker ) {
307
- Log_OC .d (TAG , "downloading file without notification: " + file . getFileName () );
308
+ Log_OC .d (TAG , "downloading file without notification: " + filename );
308
309
309
310
try {
310
311
final var operation = new DownloadFileOperation (mUser , file , mContext );
311
312
var result = operation .execute (getClient ());
312
313
313
314
mTransferWasRequested = true ;
314
315
315
- String filename = file .getFileName ();
316
-
317
316
if (result .isSuccess ()) {
318
317
fileDownloadHelper .saveFile (file , operation , getStorageManager ());
319
318
Log_OC .d (TAG , "requestForDownload completed for: " + filename );
@@ -324,7 +323,7 @@ private void requestForDownload(OCFile file) {
324
323
Log_OC .d (TAG , "Exception caught at requestForDownload" + e );
325
324
}
326
325
} else {
327
- Log_OC .d (TAG , "downloading file with notification: " + file . getFileName () );
326
+ Log_OC .d (TAG , "downloading file with notification: " + filename );
328
327
mTransferWasRequested = true ;
329
328
fileDownloadHelper .downloadFile (mUser , file );
330
329
}
0 commit comments