Menu

dav-sync recursive directories

dAF2000
2018-07-09
2018-07-10
  • dAF2000

    dAF2000 - 2018-07-09

    Hi,

    Dav-sync does not seem to support directories within directories to
    sync. If I sync a directory which contains other directories, I get:

    put: /x/y/z
    Resource https:<webdav URL="">/x/y/z not found.

    That's because the directory /x/y hasn't been created on the server. Am
    I doing something wrong or does dav-sync not support this?

    Thanks for the software (and answer),
    David

     
  • Pyrphoros

    Pyrphoros - 2018-07-10

    Hi,

    Thank you for using my software.

    Sub-directories should be synced without any problems, therefore this sounds like a bug.

    There are multiple reasons why this should not happen.

    First, dav-sync creates the directories on the server, before trying to upload files to it. The output should contain:

    mkcol: /x/y/
    put: /x/y/z

    Second, if uploading a file fails, because the parent directory doesn't exist, the server should respond with a 409 status message. In this case, dav-sync creates all missing directories. However your error message implies that the server responded with 404, which is not standard conform.

    I need more informations to find the error.

    What version of dav-sync do you use?

    What is your (client) operating system and your webdav server software?

    Does the path contain non-ASCII characters?

    Thanks,
    Olaf Wintermann

     
  • dAF2000

    dAF2000 - 2018-07-10

    I can reproduce it sometimes, but I don't know how to reproduce it. I will let you know if I know a "test case".

    I think it has something to do with files which were already transferred to the webdav server without using dav-sync and partial uploads (I just pressed CTRL-C while doing a dav-sync push). I just copied a directory to the webdav server and I saw the "mkcol". So, I think there's not really a bug but in some unusual cases dav-sync thinks a directory was already created, while it isn't.

    So, if I can reproduce it, I'll let you know.

    About your other questions: version 1.2.0, client is Linux on laptop and on raspberry pi. Server software is owncloud. Path is all ASCII.

     
  • Pyrphoros

    Pyrphoros - 2018-07-10

    Thanks for the information.

    I still can't really reproduce the problem with dav-sync, however I did some testing with owncloud and found out that owncloud returns a 404 status code in this case, however the spec says it should be 409. I added a check for this status code and dav-sync should be able to upload files now, even if the parent directory doesn't exist.

    You can get the newest source code with the fix from the hg repository:

    hg clone http://hg.code.sf.net/p/davutils/dav

     
  • dAF2000

    dAF2000 - 2018-07-10

    Thanks. I will first see if I can reproduce it and see if it's solved after the check for 404.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.