mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 13:45:35 +03:00
Update remote path of the upload in the database just after rename
This commit is contained in:
parent
15eb8b493b
commit
def9478d44
2 changed files with 5 additions and 1 deletions
|
@ -660,7 +660,7 @@ public class FileUploader extends Service
|
|||
UploadFileOperation upload = removeResult.first;
|
||||
if (upload == null &&
|
||||
mCurrentUpload != null && mCurrentAccount != null &&
|
||||
remotePath.contains(mCurrentUpload.getFileName()) &&
|
||||
mCurrentUpload.getRemotePath().startsWith(remotePath) &&
|
||||
accountName.equals(mCurrentAccount.name)) {
|
||||
|
||||
upload = mCurrentUpload;
|
||||
|
|
|
@ -26,6 +26,7 @@ import android.net.Uri;
|
|||
|
||||
import com.owncloud.android.datamodel.FileDataStorageManager;
|
||||
import com.owncloud.android.datamodel.OCFile;
|
||||
import com.owncloud.android.datamodel.UploadsStorageManager;
|
||||
import com.owncloud.android.db.OCUpload;
|
||||
import com.owncloud.android.files.services.FileUploader;
|
||||
import com.owncloud.android.lib.common.OwnCloudClient;
|
||||
|
@ -363,6 +364,9 @@ public class UploadFileOperation extends SyncOperation {
|
|||
createNewOCFile(remotePath);
|
||||
Log_OC.d(TAG, "File renamed as " + remotePath);
|
||||
}
|
||||
mRemotePath = remotePath;
|
||||
UploadsStorageManager usm = new UploadsStorageManager(mContext.getContentResolver());
|
||||
usm.updateDatabaseUploadStart(this);
|
||||
}
|
||||
|
||||
if (mCancellationRequested.get()) {
|
||||
|
|
Loading…
Reference in a new issue