mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 13:45:35 +03:00
Merge pull request #3538 from nextcloud/abortSyncIfNoInternet
if no internet connection, abort sync
This commit is contained in:
commit
454fb0a547
1 changed files with 2 additions and 1 deletions
|
@ -190,13 +190,14 @@ public class SynchronizeFileOperation extends SyncOperation {
|
|||
|
||||
} else {
|
||||
/// local copy in the device -> need to think a bit more before do anything
|
||||
|
||||
if (mServerFile == null) {
|
||||
ReadFileRemoteOperation operation = new ReadFileRemoteOperation(mRemotePath);
|
||||
result = operation.execute(client);
|
||||
if (result.isSuccess()) {
|
||||
mServerFile = FileStorageUtils.fillOCFile((RemoteFile) result.getData().get(0));
|
||||
mServerFile.setLastSyncDateForProperties(System.currentTimeMillis());
|
||||
} else if (result.getCode() == ResultCode.NO_NETWORK_CONNECTION) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue