serverChanged = (!mServerFile.getEtag().equals(mLocalFile.getEtag())); // TODO could this be dangerous when the user upgrades the server from non-tagged to tagged?
} else {
// server without etags
- serverChanged = (mServerFile.getModificationTimestamp() > mLocalFile.getModificationTimestamp());
+ serverChanged = (mServerFile.getModificationTimestamp() > mLocalFile.getModificationTimestampAtLastSyncForData());
}
boolean localChanged = (mLocalChangeAlreadyKnown || mLocalFile.getLocalModificationTimestamp() > mLocalFile.getLastSyncDateForData());
// TODO this will be always true after the app is upgraded to database version 3; will result in unnecessary uploads
file.setCreationTimestamp(we.createTimestamp());
file.setFileLength(we.contentLength());
file.setMimetype(we.contentType());
- file.setModificationTimestamp(we.modifiedTimesamp());
+ file.setModificationTimestamp(we.modifiedTimestamp());
return file;
}
return mTransferWasRequested;
}
+
+ public OCFile getLocalFile() {
+ return mLocalFile;
+ }
+
}