Re: SabreDav OS X

14 views
Skip to first unread message

Evert Pot

unread,
Jul 28, 2009, 10:03:37 AM7/28/09
to Michael Gauthier, sabredav...@googlegroups.com
On 28-Jul-09, at 9:25 AM, Michael Gauthier wrote:

> Hello Evert,
>
> I'm testing a database-backed SabreDav virtual filesystem. On OS X,
> when
> you create a new file, the Directory::createFile() method is called
> twice. Is this a known issue with OS X, and how should this be handled
> using SabreDav?

Hey Michael,

I have cc-ed this to the mailing list. Would you mind posting any
follow-ups there?
http://groups.google.com/group/sabredav-discuss


I've seen this before,

OS/X Finder is a really bad behaving client. If you do see createFile
being called twice, it must mean 1 of two things:

1. You're actually seeing different files being created (resource
forks).
2. The file gets created, deleted, and then created again.

#1 can be remedied using the temporary file filter:
http://code.google.com/p/sabredav/wiki/TemporaryFileFilter

#2 is something your database backend should accommodate for. I don't
really have an easy answer here, but these types of behaviours are
unfortunately not uncommon.

Evert

Michael Gauthier

unread,
Jul 28, 2009, 10:44:49 AM7/28/09
to SabreDAV Discussion


On Jul 28, 11:03 am, Evert Pot <evert...@gmail.com> wrote:
> On 28-Jul-09, at 9:25 AM, Michael Gauthier wrote:
>
> > Hello Evert,
>
> > I'm testing a database-backed SabreDav virtual filesystem. On OS X,  
> > when
> > you create a new file, the Directory::createFile() method is called
> > twice. Is this a known issue with OS X, and how should this be handled
> > using SabreDav?
>
> Hey Michael,
>
> I have cc-ed this to the mailing list. Would you mind posting any  
> follow-ups there?http://groups.google.com/group/sabredav-discuss
>
> I've seen this before,
>
> OS/X Finder is a really bad behaving client. If you do see createFile  
> being called twice, it must mean 1 of two things:
>
> 1. You're actually seeing different files being created (resource  
> forks).
> 2. The file gets created, deleted, and then created again.
>
> #1 can be remedied using the temporary file filter:http://code.google.com/p/sabredav/wiki/TemporaryFileFilter
>
> #2 is something your database backend should accommodate for. I don't  
> really have an easy answer here, but these types of behaviours are  
> unfortunately not uncommon.

After a bit of testing, it turns out situation 1 was occurring. OS X
is creating a ._ file for each file I upload. The temporary file
filter should do the trick nicely!

Regards,

Mike

Graham Perrin

unread,
Aug 4, 2009, 12:51:43 PM8/4/09
to SabreDAV Discussion
On Jul 28, 3:44 pm, Michael Gauthier <mike.gauth...@gmail.com> wrote:

> On Jul 28, 11:03 am, Evert Pot <evert...@gmail.com> wrote:

>> OS/X Finder is a really bad behaving client

Not really. With respect, you need to understand more about extended
attributes, HFS+ etc..

>> 1. You're actually seeing different files being created
>> (resource forks).

Not necessarily.

> After a bit of testing, it turns out situation 1 was occurring. OS
> X is creating a ._ file for each file I upload. The temporary file
> filter should do the trick nicely!

Treatment of all ._ files as temporary is not a good idea.

Regards
Graham
Reply all
Reply to author
Forward
0 new messages