1 ------------------------------------------------------------
3 revision-id: squid3@treenet.co.nz-20170529043611-1hyb93ivtu5wrdwg
4 parent: squid3@treenet.co.nz-20170529042116-kp9naxxmdsqicpjv
5 fixes bug: http://bugs.squid-cache.org/show_bug.cgi?id=3102
6 author: Martin von Gagern <martin.vgagern@gmx.net>
7 committer: Amos Jeffries <squid3@treenet.co.nz>
9 timestamp: Mon 2017-05-29 16:36:11 +1200
11 Bug 3102: FTP directory listing drops fist character of file names
12 ------------------------------------------------------------
13 # Bazaar merge directive format 2 (Bazaar 0.90)
14 # revision_id: squid3@treenet.co.nz-20170529043611-1hyb93ivtu5wrdwg
15 # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.5
16 # testament_sha1: 60a5f01fc9c9967c55c651c31546cb1067325705
17 # timestamp: 2017-05-29 04:39:59 +0000
18 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.5
19 # base_revision_id: squid3@treenet.co.nz-20170529042116-\
23 === modified file 'src/clients/FtpGateway.cc'
24 --- src/clients/FtpGateway.cc 2017-02-26 08:50:09 +0000
25 +++ src/clients/FtpGateway.cc 2017-05-29 04:36:11 +0000
27 while (strchr(w_space, *copyFrom))
30 - /* XXX assumes a single space between date and filename
31 + /* Handle the following four formats:
32 + * "MMM DD YYYY Name"
34 + * "MMM DD YYYY Name"
35 + * "MMM DD YYYY Name"
36 + * Assuming a single space between date and filename
37 * suggested by: Nathan.Bailey@cc.monash.edu.au and
38 * Mike Battersby <mike@starbug.bofh.asn.au> */
39 - copyFrom += strlen(tbuf) + 1;
40 + copyFrom += strlen(tbuf);
41 + if (strchr(w_space, *copyFrom))
45 p->name = xstrdup(copyFrom);