boolean overriden = false;
ContentValues cv = new ContentValues();
cv.put(ProviderTableMeta.FILE_MODIFIED, file.getModificationTimestamp());
+ cv.put(ProviderTableMeta.FILE_MODIFIED_AT_LAST_SYNC_FOR_DATA, file.getModificationTimestampAtLastSyncForData());
cv.put(ProviderTableMeta.FILE_CREATION, file.getCreationTimestamp());
cv.put(ProviderTableMeta.FILE_CONTENT_LENGTH, file.getFileLength());
cv.put(ProviderTableMeta.FILE_CONTENT_TYPE, file.getMimetype());
file = filesIt.next();
ContentValues cv = new ContentValues();
cv.put(ProviderTableMeta.FILE_MODIFIED, file.getModificationTimestamp());
+ cv.put(ProviderTableMeta.FILE_MODIFIED_AT_LAST_SYNC_FOR_DATA, file.getModificationTimestampAtLastSyncForData());
cv.put(ProviderTableMeta.FILE_CREATION, file.getCreationTimestamp());
cv.put(ProviderTableMeta.FILE_CONTENT_LENGTH, file.getFileLength());
cv.put(ProviderTableMeta.FILE_CONTENT_TYPE, file.getMimetype());
@Override
public Vector<OCFile> getDirectoryContent(OCFile f) {
+ Vector<OCFile> ret = new Vector<OCFile>();
if (f != null && f.isDirectory() && f.getFileId() != -1) {
- Vector<OCFile> ret = new Vector<OCFile>();
Uri req_uri = Uri.withAppendedPath(
ProviderTableMeta.CONTENT_URI_DIR,
Collections.sort(ret);
- return ret;
}
- return null;
+ return ret;
}
private boolean fileExists(String cmp_key, String value) {
.getColumnIndex(ProviderTableMeta.FILE_CREATION)));
file.setModificationTimestamp(c.getLong(c
.getColumnIndex(ProviderTableMeta.FILE_MODIFIED)));
+ file.setModificationTimestampAtLastSyncForData(c.getLong(c
+ .getColumnIndex(ProviderTableMeta.FILE_MODIFIED_AT_LAST_SYNC_FOR_DATA)));
file.setLastSyncDateForProperties(c.getLong(c
.getColumnIndex(ProviderTableMeta.FILE_LAST_SYNC_DATE)));
file.setLastSyncDateForData(c.getLong(c.
// TODO consider possible failures
if (dir != null && dir.isDirectory() && dir.getFileId() != -1) {
Vector<OCFile> children = getDirectoryContent(dir);
- if (children != null) {
+ if (children.size() > 0) {
OCFile child = null;
for (int i=0; i<children.size(); i++) {
child = children.get(i);