-
Notifications
You must be signed in to change notification settings - Fork 123
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
WatcherSyncDelete logic #646
Comments
Hello Ahmed, That's because some software (for instance MS Word) delete the file and rewrite it, every time they save. Cheers! |
Eg: when you save an office file (test.doc for example) it will not write directly to the file, instead it will first write the new file to a temporary hidden file, then delete the original file and rename the temp file. take a look at my implementation: https://github.com/lelmarir/CmisSync/blob/master/CmisSync.Lib/Watcher.cs |
Thanks you for your help;I already understand the purpose of the WatcherSyncDelete ; |
1- I've reworked the watcher in my fork as part of a global refactoring to start a new GUI (see my pull request #627) but, i know, I've ended with a drastic break with nicolas-raoul's code (i'm sorry). But i needed it.
(sleep for a wile and force a full sync) 2- well, you still need two timer because the "remote_timer" will trigger a partial or full remote sync and it's main purpose is to sync new remote changes (remote-->local) and will also do the opposite in the while. But this is a slow process and will put some stress on the server (because it will ask for changes or do a recursive scan) so it should be done only once in a while (15 seconds is too short, 60sec is a better interval). I hope I have been clear, if any question ask away ps. the code in my fork is not the final one i'm using in production, is more a proof of concept, |
Thanks for your help |
@lelmarir I want to fix this part, and if possible I would like our two branches to use the same solutions, so that we can cooperate more in the future too. |
Hi @nicolas-raoul ;
I want to understand why WatcherSyncDelete method doesn't delete directly from the server instead of waiting the next syn to run.
The text was updated successfully, but these errors were encountered: