Bug 26649

Summary: cadaver's mget fails on spaces/wildcards in args
Product: Branch 5.1 Reporter: Ivan Zakharyaschev <imz>
Component: cadaverAssignee: Nikolay A. Fetisov <naf>
Status: CLOSED FIXED QA Contact: QA 5.1 <qa-5.1>
Severity: normal    
Priority: P3    
Version: unspecified   
Hardware: all   
OS: Linux   

Description Ivan Zakharyaschev 2011-11-28 20:58:23 MSK
cadaver-0.23.2-alt2

"mget ARG" where ARG contains wildcards and expands to filenames with spaces seems to fail:

$ echo -e 'cd "SEM Sep21 1 TO PRINT"\n ls\n mget *' | cadaver -t https://public.me.com/ix/rudchenko/
dav:/ix/rudchenko/> dav:/ix/rudchenko/SEM Sep21 1 TO PRINT/> Listing collection `/ix/rudchenko/SEM%20Sep21%201%20TO%20PRINT/': succeeded.
        MATINF1-4_ogl_1class.doc           35328  Сен 21 01:30
        MI SEM 1 p1-14 sep19.pdf          650441  Сен 21 01:30
        MI SEM 1 p107-122 sem19.pdf      2468104  Сен 21 01:30
        MI SEM 1 p123-138 sep19.pdf       854456  Сен 21 01:30
        MI SEM 1 p15-30 sep19.pdf        3264302  Сен 21 01:30
        MI SEM 1 p31-44 sep19.pdf        1204219  Сен 21 01:30
        MI SEM 1 p45-56 sep19.pdf        3046833  Сен 21 01:30
        MI SEM 1 p57-72 sep21.pdf        1646398  Сен 21 13:04
        MI SEM 1 p73-90 sep19.pdf        2117173  Сен 21 01:30
        MI SEM 1 p91-106 sep19.pdf       1541092  Сен 21 01:30
dav:/ix/rudchenko/SEM Sep21 1 TO PRINT/> [Matching... 10 matches.]
Downloading `/ix/rudchenko/SEM%20Sep21%201%20TO%20PRINT/MI%2520SEM%25201%2520p91-106%2520sep19.pdf' to MI%20SEM%201%20p91-106%20sep19.pdf:
Progress: [=============================>] 100,0% of 9 bytes failed:
404 Not Found
Downloading `/ix/rudchenko/SEM%20Sep21%201%20TO%20PRINT/MI%2520SEM%25201%2520p73-90%2520sep19.pdf' to MI%20SEM%201%20p73-90%20sep19.pdf:
Progress: [=============================>] 100,0% of 9 bytes failed:
404 Not Found
Downloading `/ix/rudchenko/SEM%20Sep21%201%20TO%20PRINT/MI%2520SEM%25201%2520p57-72%2520sep21.pdf' to MI%20SEM%201%20p57-72%20sep21.pdf:
Progress: [=============================>] 100,0% of 9 bytes failed:
404 Not Found
Downloading `/ix/rudchenko/SEM%20Sep21%201%20TO%20PRINT/MI%2520SEM%25201%2520p45-56%2520sep19.pdf' to MI%20SEM%201%20p45-56%20sep19.pdf:
Progress: [=============================>] 100,0% of 9 bytes failed:
404 Not Found
Downloading `/ix/rudchenko/SEM%20Sep21%201%20TO%20PRINT/MI%2520SEM%25201%2520p31-44%2520sep19.pdf' to MI%20SEM%201%20p31-44%20sep19.pdf:
Progress: [=============================>] 100,0% of 9 bytes failed:
404 Not Found
Downloading `/ix/rudchenko/SEM%20Sep21%201%20TO%20PRINT/MI%2520SEM%25201%2520p15-30%2520sep19.pdf' to MI%20SEM%201%20p15-30%20sep19.pdf:
Progress: [=============================>] 100,0% of 9 bytes failed:
404 Not Found
Downloading `/ix/rudchenko/SEM%20Sep21%201%20TO%20PRINT/MI%2520SEM%25201%2520p123-138%2520sep19.pdf' to MI%20SEM%201%20p123-138%20sep19.pdf:
Progress: [=============================>] 100,0% of 9 bytes failed:
404 Not Found
Downloading `/ix/rudchenko/SEM%20Sep21%201%20TO%20PRINT/MI%2520SEM%25201%2520p107-122%2520sem19.pdf' to MI%20SEM%201%20p107-122%20sem19.pdf:
Progress: [=============================>] 100,0% of 9 bytes failed:
404 Not Found
Downloading `/ix/rudchenko/SEM%20Sep21%201%20TO%20PRINT/MI%2520SEM%25201%2520p1-14%2520sep19.pdf' to MI%20SEM%201%20p1-14%20sep19.pdf:
Progress: [=============================>] 100,0% of 9 bytes failed:
404 Not Found
Downloading `/ix/rudchenko/SEM%20Sep21%201%20TO%20PRINT/MATINF1-4_ogl_1class.doc' to MATINF1-4_ogl_1class.doc:
Progress: [=============================>] 100,0% of 35328 bytes succeeded.
dav:/ix/rudchenko/SEM Sep21 1 TO PRINT/> 
Connection to `public.me.com' closed.
$ 

Note that the files whose download failed are those that have spaces in their names.

Work-around: use another tool to access WebDAV, e.g., wdfs-1.4.2-alt0.M51.1 (FUSE-based; so the users having permissions for /dev/fuse are able to use it); like that:

$ mkdir viewRemote
$ wdfs https://public.me.com/ix/rudchenko/ viewRemote
$ rsync -av viewRemote/SEM*TO\ PRINT* ./
sending incremental file list
SEM Sep20 4 TO PRINT/
SEM Sep20 4 TO PRINT/MATINF1-4_ogl_4class.doc
SEM Sep20 4 TO PRINT/MI SEM 4 p1-16 sep20.pdf
SEM Sep20 4 TO PRINT/MI SEM 4 p17-32 sep20.pdf
SEM Sep20 4 TO PRINT/MI SEM 4 p33-48 sep20.pdf
SEM Sep20 4 TO PRINT/MI SEM 4 p49-62 sep20.pdf
SEM Sep20 4 TO PRINT/MI SEM 4 p63-78 sep20.pdf
SEM Sep20 4 TO PRINT/MI SEM 4 p79-90 sep20.pdf
SEM Sep21 1 TO PRINT/
SEM Sep21 1 TO PRINT/MATINF1-4_ogl_1class.doc
SEM Sep21 1 TO PRINT/MI SEM 1 p1-14 sep19.pdf
SEM Sep21 1 TO PRINT/MI SEM 1 p107-122 sem19.pdf
SEM Sep21 1 TO PRINT/MI SEM 1 p123-138 sep19.pdf
SEM Sep21 1 TO PRINT/MI SEM 1 p15-30 sep19.pdf
SEM Sep21 1 TO PRINT/MI SEM 1 p31-44 sep19.pdf
SEM Sep21 1 TO PRINT/MI SEM 1 p45-56 sep19.pdf
SEM Sep21 1 TO PRINT/MI SEM 1 p57-72 sep21.pdf
SEM Sep21 1 TO PRINT/MI SEM 1 p73-90 sep19.pdf
SEM Sep21 1 TO PRINT/MI SEM 1 p91-106 sep19.pdf
SEM Sep21 2 TO PRINT/
SEM Sep21 2 TO PRINT/MATINF1-4_ogl_2class.doc
SEM Sep21 2 TO PRINT/MI SEM 2 p1-16 sep19.pdf
SEM Sep21 2 TO PRINT/MI SEM 2 p107-122 sep19.pdf
SEM Sep21 2 TO PRINT/MI SEM 2 p123-125 sep19.pdf
SEM Sep21 2 TO PRINT/MI SEM 2 p17-34 sep21.pdf
SEM Sep21 2 TO PRINT/MI SEM 2 p35-50 sep21.pdf
SEM Sep21 2 TO PRINT/MI SEM 2 p51-64 sem21.pdf
SEM Sep21 2 TO PRINT/MI SEM 2 p65-80 sep21.pdf
SEM Sep21 2 TO PRINT/MI SEM 2 p81-90 sep21.pdf
SEM Sep21 2 TO PRINT/MI SEM 2 p91-106 sep21.pdf
SEM Sep21 3 TO PRINT/
SEM Sep21 3 TO PRINT/MATINF1-4_ogl_3class.doc
SEM Sep21 3 TO PRINT/MI SEM 3 p1-16 sep20.pdf
SEM Sep21 3 TO PRINT/MI SEM 3 p107-120 sep21.pdf
SEM Sep21 3 TO PRINT/MI SEM 3 p121-124 sep21.pdf
SEM Sep21 3 TO PRINT/MI SEM 3 p17-34 sep20.pdf
SEM Sep21 3 TO PRINT/MI SEM 3 p35-50 sep21.pdf
SEM Sep21 3 TO PRINT/MI SEM 3 p51-68 sep21.pdf
SEM Sep21 3 TO PRINT/MI SEM 3 p69-76 sep21.pdf
SEM Sep21 3 TO PRINT/MI SEM 3 p77-90 sep21.pdf
SEM Sep21 3 TO PRINT/MI SEM 3 p91-106 sep21.pdf

sent 22528983 bytes  received 731 bytes  59681.36 bytes/sec
total size is 22523595  speedup is 1.00
$ evince SEM\ Sep21\ 1\ TO\ PRINT/MI\ SEM\ 1\ p1-14\ sep19.pdf 
$ # (The files are OK.)
$ fusermount -u ./viewRemote ||:
$ rmdir ./viewRemote
$
Comment 1 Repository Robot 2012-01-06 01:03:27 MSK
cadaver-0.23.3-alt2 -> sisyphus:

* Thu Jan 05 2012 Nikolay A. Fetisov <naf@altlinux> 0.23.3-alt2
- Fix remote args globbing (Closes: #26649)