https://bz.apache.org/bugzilla/show_bug.cgi?id=63259
Bug ID: 63259 Summary: FTP directories are checked twice Product: Ant Version: 1.10.5 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P2 Component: Optional Tasks Assignee: notifications@ant.apache.org Reporter: eugene.ad...@gmail.com Target Milestone: --- When running FTP task to list files, the directories are checked twice. This is not necessary and has a negative impact on performance. This happens because the current code checks if an entry (of the list) is a directory, and if it is not it then tries to determine if this is a file by - again - checking if it is not a directory. The network capture then looks like this, for example with two "rfc7296.txt: No such file or directory" : 19:48:21.101597 IP 4.31.198.44.21 > 185.47.63.113.54412: Flags [P.], seq 5804:5845, ack 1278, win 22, options [nop,nop,TS val 134060372 ecr 2715006999], length 41 EH.]..@./......,./?q....6.Z.'.:]....m...... ...T....257 "/rfc/std" is the current directory 19:48:21.101958 IP 185.47.63.113.54412 > 4.31.198.44.21: Flags [P.], seq 1278:1298, ack 5845, win 140, options [nop,nop,TS val 2715007166 ecr 134060372], length 20 E..HE,@.@.2../?q...,....'.:]6.Z.....~...... .......TCWD ../rfc7296.txt 19:48:21.268070 IP 4.31.198.44.21 > 185.47.63.113.54412: Flags [P.], seq 5845:5892, ack 1298, win 22, options [nop,nop,TS val 134060414 ecr 2715007166], length 47 EH.c..@./......,./?q....6.Z.'.:q........... ...~....550 ../rfc7296.txt: No such file or directory 19:48:21.268350 IP 185.47.63.113.54412 > 4.31.198.44.21: Flags [P.], seq 1298:1303, ack 5892, win 140, options [nop,nop,TS val 2715007333 ecr 134060414], length 5 E..9E-@.@.2../?q...,....'.:q6.[.....OY..... ...e...~PWD 19:48:21.415135 IP 4.31.198.44.21 > 185.47.63.113.54412: Flags [P.], seq 5892:5933, ack 1303, win 22, options [nop,nop,TS val 134060455 ecr 2715007333], length 41 EH.]..@./......,./?q....6.[.'.:v....k...... .......e257 "/rfc/std" is the current directory 19:48:21.415478 IP 185.47.63.113.54412 > 4.31.198.44.21: Flags [P.], seq 1303:1323, ack 5933, win 140, options [nop,nop,TS val 2715007480 ecr 134060455], length 20 E..HE.@.@.2../?q...,....'.:v6.[*....|...... ........CWD ../rfc7296.txt 19:48:21.563730 IP 4.31.198.44.21 > 185.47.63.113.54412: Flags [P.], seq 5933:5980, ack 1323, win 22, options [nop,nop,TS val 134060492 ecr 2715007480], length 47 EH.c..@./......,./?q....6.[*'.:............ ........550 ../rfc7296.txt: No such file or directory 19:48:21.564411 IP 185.47.63.113.54412 > 4.31.198.44.21: Flags [P.], seq 1323:1328, ack 5980, win 140, options [nop,nop,TS val 2715007629 ecr 134060492], length 5 E..9E/@.@.2../?q...,....'.:.6.[Y....Mr..... ........PWD 19:48:21.711083 IP 4.31.198.44.21 > 185.47.63.113.54412: Flags [P.], seq 5980:6021, ack 1328, win 22, options [nop,nop,TS val 134060529 ecr 2715007629], length 41 EH.]..@./......,./?q....6.[Y'.:.....j...... ........257 "/rfc/std" is the current directory 19:48:21.711398 IP 185.47.63.113.54412 > 4.31.198.44.21: Flags [P.], seq 1328:1346, ack 6021, win 140, options [nop,nop,TS val 2715007776 ecr 134060529], length 18 E..FE0@.@.2../?q...,....'.:.6.[......E..... ... ....CWD ../rfc20.txt example target is : <target name="listingWithSymlinks"> <ftp action="list" listing="listingWithSymlinks.txt" server="ftp.ietf.org" port="21" remotedir="/rfc/std" userid="anonymous" password="anonymous" > <fileset dir="." defaultexcludes="no" includes="*" /> </ftp> </target> output is listingWithSymlinks: [ftp] Opening FTP connection to ftp.ietf.org [ftp] connected [ftp] logging in to FTP server [ftp] login succeeded [ftp] changing the remote directory to /rfc/std [ftp] listing files fileset: Setup scanner in dir /home/eadell/tests/ftpant with patternSet{ includes: [*] excludes: [] } [ftp] 92 files listed [ftp] disconnecting BUILD SUCCESSFUL Total time: 1 minute 19 seconds -- You are receiving this mail because: You are the assignee for the bug.