Skip to content

Commit

Permalink
sync nested folders
Browse files Browse the repository at this point in the history
Signed-off-by: alperozturk <[email protected]>
  • Loading branch information
alperozturk96 committed Nov 7, 2024
1 parent a05d638 commit ba05f94
Showing 1 changed file with 14 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -414,23 +413,21 @@ private void classifyFileForLaterSyncOrDownload(OCFile remoteFile, OCFile localF


private void prepareOpsFromLocalKnowledge() throws OperationCancelledException {
List<OCFile> children = getStorageManager().getFolderContent(mLocalFolder, false);
List<OCFile> 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);
}
}
}
Expand Down

0 comments on commit ba05f94

Please sign in to comment.