pydio / pydio-sync

Python version of the Pydio synchronization client
https://pydio.com
GNU General Public License v3.0
82 stars 32 forks source link

Creating file over WebDav causes PydioSync to sync at 0KB #156

Closed FourEyedPanda closed 7 years ago

FourEyedPanda commented 7 years ago

When you create a file over WebDav, PydioSync syncs it at 0KB. It looks like it just creates the file locally rather than grab it from the server based on the logs. If you do make an edit a type of "content" will be added to ajxp_changes and this will update the file fully.

ajxp_changes shows no difference between a create from WebDav and a create by uploading on Pydio WebUI so I am unsure why this is happening.

2017-01-08 00:27:04 INFO 1604 Thread-1 logging : 1627 | info | Processing 1 changes 2017-01-08 00:27:04 INFO 1604 Thread-1 logging : 1627 | info | To be processed 1 2017-01-08 00:27:04 INFO 11328 Thread-138 logging : 1627 | info | /InstantUpload/log.txt <============ MKFILE 2017-01-08 00:27:04 INFO 11328 Thread-138 logging : 1627 | info | New file created at /InstantUpload/log.txt 2017-01-08 00:27:04 INFO 1604 Thread-1 logging : 1627 | info | Checking history for failed changes and retry.

7omate commented 7 years ago

Hi, MKFILE denotes the creation of an Empty file, if the file is no longer empty a content event should happen and cause the download of the file, if the file was modified the checksum would differ and the file redownloaded.

How do you put content in the files? (There is a bug in the txt editor that comes with Pydio web interface, the firts save doesn't trigger a content modified event)

FourEyedPanda commented 7 years ago

The content is part of the create originally. For example I used windows webdav or another webdav client to upload a file. ajxp_changes logs a CREATE but no CONTENT afterwards because it was created with the content. Weirdly enough the online text editor is the one I used to edit and it did add content to ajxp_changes. I have yet to test with a notepad over Windows WebDav.

Edit: I actually did test it before, just forgot. If I edit over WebDav it does not log a content. In fact there is no log at all in ajxp_changes. I logged the issue under pydio-core as I felt it is more of a pydio-core issue: Issue #1318

The one thing I want to point out again is that an upload on Pydio WebUI upload only shows CREATE on ajxp_changes as well and no content, yet PydioSync syncs that correctly. I might be wrong but, I believe it might be because if done over WebDav when the file is created it is an empty file and PydioSync got the message and just ended up creating a file since there is no content vs Pydio Web UI does not log a CREATE until the file is done uploading.

Edit: Just tested uploading a big file over Pydio WebUI and WebDav. It is not logged into ajxp_changes until the file is done uploading in the WebUI. This is in contrast with what happens with WebDav where it is logged on CREATE and CONTENT is never added even when file is done uploading.

7omate commented 7 years ago

Ok, so the summary of your intensive testing could be that webdav events occur too early ? They need to happen after the files are complete?

cdujeu commented 7 years ago

See #1318, should be closed