[Owncloud] Several problems while implementing a changelog module for owncloud.

Robert Nagy robert.nagy at gmail.com
Mon Apr 23 16:35:25 UTC 2012


Hello,

We have been trying to implement a really simple changelog module to track
the modifications made to each file and then we are sending out an email
with a digest script that can be configured to run at the desired time.

Anyways the point is that we have ran into several issues while we were
implementing this module.

First of all it seems that the sharing of files with groups is really problematic.
When we share a file with a group an entry gets added to the share table with
a username at group mark, for each user that is a member of that group, but the problem
is if you add a new user to that group, a share entry will never be added automatically
unless we re-share the file with that group.

The second problem is with the callbacks in the filesystem module.

Creating a file actually fires two post_write events in addition
to the post_create event.
One where the file size is 0 and the send one when the file
size is 2 bytes which I think is because of the two newlines
which gets added automatically.

171|/test/files/testfile has been modified|1334832666
172|/test/files/testfile has been modified|1334832666

Then I am sharing this file with a group and that is going to
create another post_write event for user that is already
a member of the specified group.

173|/test/files/robert/files/Shared/testfile has been modified|1334832729
174|/test/files/test2/files/Shared/testfile has been modified|1334832729

Then editing this file creates another chain of crazy events:
175|/test/files/robert/files/Shared/testfile has been modified|1334832822
176|/test/files/testfile has been modified|1334832822

As you can see it creates an event under the robert's user dir but it
does not trigger an event for the test2 user which is also a member of
the group.

Then editing the same file in the Shared folder using a different user
yields the following path in the post_write event:
177|/testfile has been modified|1334832895

As you can see it is basically impossible to rely on these callbacks or
the path that is being passed to them.

---

So basically these are the major issues that stop us from using owncloud
for real because it is basically impossible to keep a decent changelog of
things.

Do you have any plans of changing the behaviour to actually reflect the
reality of what is happening with files or do you know about these bugs?

Thank you



More information about the Owncloud mailing list