Re: Problems with Move

26 views
Skip to first unread message

Evert Pot

unread,
Nov 13, 2012, 5:54:12 AM11/13/12
to sabredav...@googlegroups.com
On Nov 13, 2012, at 4:36 AM, Richard June <rolfanr...@gmail.com> wrote:

> I'm using Ubuntu 12.04 (Nautilus) as the client
> I can create, and delete files and folders no problem. But when I try to rename a file I get an error saying the file already exists. I'm looking for some sample code on renaming / moving files or folders.

Not really sure what you mean with sample code..

But I think you may be experiencing this bug:

https://bugzilla.gnome.org/show_bug.cgi?id=551339

Evert



Richard June

unread,
Nov 13, 2012, 4:24:08 PM11/13/12
to sabredav...@googlegroups.com
I have a test setup at webdav.oriontechnologysolutions.com

I have attached my index.php file. 

If I run this with cadaver, it claims to succeed. but it actually fails

 dav:/> move test
 test      test.txt  
 dav:/> move test.txt test.html
 Moving `/test.txt' to `/test.html':  succeeded.
 dav:/> ls
 Listing collection `/': succeeded. 
 Coll:   test                                   0  Nov 13 15:23
        Untitled Document 1668                 0  Oct 31 18:16
        test.txt                              52  Oct 31 17:52

I don't think it's a Nautilus specific issue here. 
index.txt

Evert Pot

unread,
Nov 13, 2012, 4:30:12 PM11/13/12
to sabredav...@googlegroups.com
Hi,

On Nov 13, 2012, at 10:24 PM, Richard June <rolfanr...@gmail.com> wrote:

> I have a test setup at webdav.oriontechnologysolutions.com
>
> I have attached my index.php file.
>
> If I run this with cadaver, it claims to succeed. but it actually fails
>
> cadaver webdav.oriontechnologysolutions.com
> dav:/> move test
> test test.txt
> dav:/> move test.txt test.html
> Moving `/test.txt' to `/test.html': succeeded.
> dav:/> ls
> Listing collection `/': succeeded.
> Coll: test 0 Nov 13 15:23
> Untitled Document 1668 0 Oct 31 18:16
> test.txt 52 Oct 31 17:52
>
> I don't think it's a Nautilus specific issue here.

You're right.

I was under the assumption you were using the standard FS classes.

When a file or directory gets moved *within* the current directory, the setName() method is called.
In your index.php you are not doing anything with setName(). You must implement it.

Also note that there's a working default implementation in Sabre_DAV_FS_Directory and Sabre_DAV_FS_File.
Those may be better than than the classes you're using, unless your plan is to make further modifications.

Evert

Richard June

unread,
Nov 13, 2012, 9:48:11 PM11/13/12
to sabredav...@googlegroups.com
I'll be making further modifications. I'm just wanting to see it all work on a generic directory structure before moving on to actually getting complicated
Reply all
Reply to author
Forward
0 new messages