From: David A. Velasco Date: Fri, 21 Aug 2015 12:55:52 +0000 (+0200) Subject: Fixed permanent 'uploading' icon on files that are automatically renamed during the... X-Git-Tag: oc-android-1.9^2~37^2~12 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/1e59a632bcedc56845e6494f244e79d76a1f8b8a?ds=inline;hp=-c Fixed permanent 'uploading' icon on files that are automatically renamed during the upload --- 1e59a632bcedc56845e6494f244e79d76a1f8b8a diff --git a/src/com/owncloud/android/files/services/FileUploader.java b/src/com/owncloud/android/files/services/FileUploader.java index 7c369967..14909344 100644 --- a/src/com/owncloud/android/files/services/FileUploader.java +++ b/src/com/owncloud/android/files/services/FileUploader.java @@ -590,8 +590,18 @@ public class FileUploader extends Service } finally { Log_OC.v("NOW " + TAG + ", thread " + Thread.currentThread().getName(), "Removing payload " + mCurrentUpload.getRemotePath()); - Pair removeResult = - mPendingUploads.removePayload(mCurrentAccount, mCurrentUpload.getRemotePath()); + Pair removeResult; + if (mCurrentUpload.wasRenamed()) { + removeResult = mPendingUploads.removePayload( + mCurrentAccount, + mCurrentUpload.getOldFile().getRemotePath() + ); + } else { + removeResult = mPendingUploads.removePayload( + mCurrentAccount, + mCurrentUpload.getRemotePath() + ); + } /// notify result notifyUploadResult(mCurrentUpload, uploadResult);