From cd160435080afea2d06a836f1c3ec2fc9c752c13 Mon Sep 17 00:00:00 2001 From: alperozturk Date: Sat, 26 Oct 2024 08:33:34 +0200 Subject: [PATCH] only sync folder Signed-off-by: alperozturk --- .../com/nextcloud/client/jobs/InternalTwoWaySyncWork.kt | 7 ------- .../owncloud/android/datamodel/FileDataStorageManager.java | 5 ++++- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/nextcloud/client/jobs/InternalTwoWaySyncWork.kt b/app/src/main/java/com/nextcloud/client/jobs/InternalTwoWaySyncWork.kt index a29c9ecdfd..90fa334f9c 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/InternalTwoWaySyncWork.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/InternalTwoWaySyncWork.kt @@ -54,13 +54,6 @@ class InternalTwoWaySyncWork( return checkFreeSpaceResult } - // do not attempt to sync root folder - if (folder.remotePath == OCFile.ROOT_PATH) { - folder.internalFolderSyncTimestamp = -1L - fileDataStorageManager.saveFile(folder) - continue - } - Log_OC.d(TAG, "Folder ${folder.remotePath}: started!") val operation = SynchronizeFolderOperation(context, folder.remotePath, user, fileDataStorageManager) .execute(context) diff --git a/app/src/main/java/com/owncloud/android/datamodel/FileDataStorageManager.java b/app/src/main/java/com/owncloud/android/datamodel/FileDataStorageManager.java index 33c8170068..1dbc31ded2 100644 --- a/app/src/main/java/com/owncloud/android/datamodel/FileDataStorageManager.java +++ b/app/src/main/java/com/owncloud/android/datamodel/FileDataStorageManager.java @@ -2643,7 +2643,10 @@ public class FileDataStorageManager { List files = new ArrayList<>(fileEntities.size()); for (FileEntity fileEntity : fileEntities) { - files.add(createFileInstance(fileEntity)); + OCFile file = createFileInstance(fileEntity); + if (file.isFolder() && !file.isRootDirectory()) { + files.add(file); + } } return files;