Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ void sync(int sourceRepoIndex, int destRepoIndex, AuthenticationInfo subject) th
List <NoteInfo> srcNotes = srcRepo.list(subject);
List <NoteInfo> dstNotes = dstRepo.list(subject);

Map<String, List<String>> noteIDs = notesCheckDiff(srcNotes, srcRepo, dstNotes, dstRepo);
Map<String, List<String>> noteIDs = notesCheckDiff(srcNotes, srcRepo, dstNotes, dstRepo,
subject);
List<String> pushNoteIDs = noteIDs.get(pushKey);
List<String> pullNoteIDs = noteIDs.get(pullKey);
List<String> delDstNoteIDs = noteIDs.get(delDstKey);
Expand Down Expand Up @@ -256,7 +257,8 @@ NotebookRepo getRepo(int repoIndex) throws IOException {
}

private Map<String, List<String>> notesCheckDiff(List<NoteInfo> sourceNotes,
NotebookRepo sourceRepo, List<NoteInfo> destNotes, NotebookRepo destRepo)
NotebookRepo sourceRepo, List<NoteInfo> destNotes, NotebookRepo destRepo,
AuthenticationInfo subject)
throws IOException {
List <String> pushIDs = new ArrayList<String>();
List <String> pullIDs = new ArrayList<String>();
Expand All @@ -268,8 +270,8 @@ private Map<String, List<String>> notesCheckDiff(List<NoteInfo> sourceNotes,
dnote = containsID(destNotes, snote.getId());
if (dnote != null) {
/* note exists in source and destination storage systems */
sdate = lastModificationDate(sourceRepo.get(snote.getId(), null));
ddate = lastModificationDate(destRepo.get(dnote.getId(), null));
sdate = lastModificationDate(sourceRepo.get(snote.getId(), subject));
ddate = lastModificationDate(destRepo.get(dnote.getId(), subject));

if (sdate.compareTo(ddate) != 0) {
if (sdate.after(ddate) || oneWaySync) {
Expand Down