Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remote files are not synced #1314

Closed
wants to merge 1 commit into from

Conversation

QubaB
Copy link
Contributor

@QubaB QubaB commented Jul 17, 2024

fix problems with syncing notes from nextcloud server

closes #1306

@QubaB QubaB mentioned this pull request Jul 17, 2024
2 tasks
@QubaB
Copy link
Contributor Author

QubaB commented Jul 19, 2024

closes #1304 also

@adil192
Copy link
Member

adil192 commented Jul 20, 2024

Thanks for finding this! I've not been able to for ages.
However, this is just hiding the problem which is that the argument to FileManager.getFile should be the local relative path not an absolute path. I'm going to address the root issue in a separate commit and give you credit.

// Local file is newer, do nothing
break;
case BestFile.remote:
case BestFile.either: //local file does not exists
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change this part? BestFile.either should be when the local and remote files are equivalent, so no sync needs to occur for this file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BestFile.either is also returned when local file does not exist. I did not searched the code why.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I've improved this aspect in 01b28d9

adil192 added a commit that referenced this pull request Jul 20, 2024
* test: ensure files are decrypted correctly

* fix: relativeLocalPath shouldn't start with documents dir

A huge thank you to @QubaB for their work finding the problem in #1314

This commit fixes the problem slightly earlier in the syncing process, and adds a test for it

Closes #1306, Closes #1304, Closes #1314
adil192 added a commit that referenced this pull request Jul 20, 2024
* test: ensure files are decrypted correctly

* fix: relativeLocalPath shouldn't start with documents dir

A huge thank you to @QubaB for their work finding the problem in #1314

This commit fixes the problem slightly earlier in the syncing process, and adds a test for it

Closes #1306, Closes #1304, Closes #1314

Co-Authored-By: QubaB <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Apps won't sync with each other (Ipad and linux)
2 participants