|
@@ -455,10 +455,7 @@ public class FileDownloader extends Service
|
|
|
|
|
|
// always get client from client manager, to get fresh credentials in case
|
|
|
// of update
|
|
|
- OwnCloudAccount ocAccount = new OwnCloudAccount(
|
|
|
- mCurrentAccount,
|
|
|
- this
|
|
|
- );
|
|
|
+ OwnCloudAccount ocAccount = new OwnCloudAccount(mCurrentAccount, this);
|
|
|
mDownloadClient = OwnCloudClientManagerFactory.getDefaultSingleton().
|
|
|
getClientFor(ocAccount, this);
|
|
|
|
|
@@ -477,6 +474,10 @@ public class FileDownloader extends Service
|
|
|
Pair<DownloadFileOperation, String> removeResult = mPendingDownloads.removePayload(
|
|
|
mCurrentAccount.name, mCurrentDownload.getRemotePath());
|
|
|
|
|
|
+ if (downloadResult == null) {
|
|
|
+ downloadResult = new RemoteOperationResult(new RuntimeException("Error downloading…"));
|
|
|
+ }
|
|
|
+
|
|
|
/// notify result
|
|
|
notifyDownloadResult(mCurrentDownload, downloadResult);
|
|
|
|