diff --git a/app/src/main/java/com/owncloud/android/operations/SynchronizeFolderOperation.java b/app/src/main/java/com/owncloud/android/operations/SynchronizeFolderOperation.java index c4e4bf05c06a..051d693dcb62 100644 --- a/app/src/main/java/com/owncloud/android/operations/SynchronizeFolderOperation.java +++ b/app/src/main/java/com/owncloud/android/operations/SynchronizeFolderOperation.java @@ -40,7 +40,6 @@ import java.util.Map; import java.util.Vector; import java.util.concurrent.atomic.AtomicBoolean; -import java.util.function.Consumer; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; @@ -414,23 +413,21 @@ private void classifyFileForLaterSyncOrDownload(OCFile remoteFile, OCFile localF private void prepareOpsFromLocalKnowledge() throws OperationCancelledException { - List children = getStorageManager().getFolderContent(mLocalFolder, false); + List children = getStorageManager().getAllFilesRecursivelyInsideFolder(mLocalFolder); for (OCFile child : children) { - if (!child.isFolder()) { - if (!child.isDown()) { - mFilesForDirectDownload.add(child); - } else { - /// this should result in direct upload of files that were locally modified - SynchronizeFileOperation operation = new SynchronizeFileOperation( - child, - child.getEtagInConflict() != null ? child : null, - user, - true, - mContext, - getStorageManager() - ); - mFilesToSyncContents.add(operation); - } + if (!child.isDown()) { + mFilesForDirectDownload.add(child); + } else { + /// this should result in direct upload of files that were locally modified + SynchronizeFileOperation operation = new SynchronizeFileOperation( + child, + child.getEtagInConflict() != null ? child : null, + user, + true, + mContext, + getStorageManager() + ); + mFilesToSyncContents.add(operation); } } }