GNOME Bugzilla – Bug 561215
Create directory fails with "Target file already exists"
Last modified: 2009-01-14 22:17:30 UTC
Please describe the problem: When trying to create a directory on a webdav share (that does not exist), the operation still fails with "Target file already exists". Steps to reproduce: 1. Mount webdav share 2. Run the following python script: #!/usr/bin/python import gio remoteextdir = gio.File('dav://www.agendo.dk/dav/docs').get_child('testdir') print "query_exists: ", remoteextdir.query_exists() print "make_directory: ", remoteextdir.make_directory() Actual results: It produces the following output: query_exists: False make_directory: Traceback (most recent call last):
+ Trace 209926
print "make_directory: ", remoteextdir.make_directory()
The directory is created though. Expected results: The directory is created, but with no error. Does this happen every time? Yes. Other information: This is probably the cause of why recursive copying to a webdav share also fails.
Additionaly, running the gvfs daemon with SOUP debugging gives some clues: backend_dbus_handler org.gtk.vfs.Mount:MakeDirectory Queued new job 0x83c4c40 (GVfsJobMakeDirectory) > MKCOL /dav/docs/testdir/ HTTP/1.1 > Soup-Debug-Timestamp: 1226932257 > Soup-Debug: SoupSessionSync 1 (0x83c2020), SoupMessage 7 (0x83c9520), SoupSocket 2 (0x83c4300) > Host: www.XXXXXXX.dk > User-Agent: gvfs/1.0.2 > Authorization: Digest username="dav_XXXXXXX", realm="www.XXXXXXX.dk", nonce="lxPVbONbBAA=46135eec1c6f84fec40254b7d7a3bc364afae2a1", uri="/dav/docs/testdir/", response="5f85d6469d74fb055b06eeb65f6c201a", cnonce="MHg4M2QxMDYwOjE4MDU6MTIyNjkzMjI0OQ==", nc="0000000d", qop="auth" < HTTP/1.1 201 Created < Soup-Debug-Timestamp: 1226932257 < Soup-Debug: SoupMessage 7 (0x83c9520) < Date: Mon, 17 Nov 2008 14:30:56 GMT < Server: Apache < Authentication-Info: rspauth="e31061522caf3eb97e74dd3bb78f2a3a", cnonce="MHg4M2QxMDYwOjE4MDU6MTIyNjkzMjI0OQ==", nc=0000000d, qop=auth < Location: http://www.XXXXXXX.dk/dav/docs/testdir/ < Content-Length: 192 < Content-Type: text/html; charset=ISO-8859-1 < < <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> < <html><head> < <title>201 Created</title> < </head><body> < <h1>Created</h1> < <p>Collection /dav/docs/testdir/ has been created.</p> < </body></html> > MKCOL /dav/docs/testdir/ HTTP/1.1 > Soup-Debug-Timestamp: 1226932257 > Soup-Debug: SoupSessionSync 1 (0x83c2020), SoupMessage 7 (0x83c9520), SoupSocket 2 (0x83c4300), restarted > Host: www.XXXXXXX.dk > User-Agent: gvfs/1.0.2 > Authorization: Digest username="dav_XXXXXXX", realm="www.XXXXXXX.dk", nonce="lxPVbONbBAA=46135eec1c6f84fec40254b7d7a3bc364afae2a1", uri="/dav/docs/testdir/", response="0b7fd52fe1e11569185dc7928fc0d00a", cnonce="MHg4M2QxMDYwOjE4MDU6MTIyNjkzMjI0OQ==", nc="0000000e", qop="auth" < HTTP/1.1 405 Method Not Allowed < Soup-Debug-Timestamp: 1226932257 < Soup-Debug: SoupMessage 7 (0x83c9520) < Date: Mon, 17 Nov 2008 14:30:56 GMT < Server: Apache < Allow: < Content-Length: 240 < Content-Type: text/html; charset=iso-8859-1 < < <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> < <html><head> < <title>405 Method Not Allowed</title> < </head><body> < <h1>Method Not Allowed</h1> < <p>The requested method MKCOL is not allowed for the URL /dav/docs/testdir/.</p> < </body></html> send_reply(0x83c4c40), failed=1 (Target file already exists)
*** This bug has been marked as a duplicate of 566452 ***