https://bz.apache.org/bugzilla/show_bug.cgi?id=63222
Bug ID: 63222
Summary: file named tilde (~) makes another file ending with ~
appears twice
Product: Ant
Version: 1.10.5
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P2
Component: Core tasks
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
When one file is strictly named ~ (tilde) and one or more file names end with
~, one of these files appears twice.
How to reproduce (I could reproduce 100%) : I have one directory published over
FTP, which contains these files :
$ ls -AFlb
total 0
-rw-r--r--. 1 caolila users 0 Mar 3 01:00 ~
-rw-r--r--. 1 caolila users 0 Mar 3 01:08 1~
-rw-r--r--. 1 caolila users 0 Mar 3 01:08 2~
-rw-r--r--. 1 caolila users 0 Mar 3 01:08 3~
Listing this directory with an ANT FTPClient gives the following :
$ more toc.txt
-r-------- 1 user group 0 Mar 3 01:08 1~
-r-------- 1 user group 0 Mar 3 01:08 2~
-r-------- 1 user group 0 Mar 3 01:08 3~
-r-------- 1 user group 0 Mar 3 01:08 1~
Native FTPClient lists correctly :
Connected to localhost.
220 Service ready for new user.
-r-------- 1 user group 0 Mar 3 01:08 1~
-r-------- 1 user group 0 Mar 3 01:08 2~
-r-------- 1 user group 0 Mar 3 01:08 3~
-r-------- 1 user group 0 Mar 3 01:00 ~
If using characters instead of numbers in the file names, I get the same issue
FTPClient
220 Service ready for new user.
-r-------- 1 user group 0 Mar 3 00:55 charactersthen~
-r-------- 1 user group 0 Mar 3 01:00 ~
ANT
$ more toc.txt
-r-------- 1 user group 0 Mar 3 00:55 charactersthen~
-r-------- 1 user group 0 Mar 3 00:55 charactersthen~
It seems that the first file of the list appears twice, which is not a random
behavior.
Note that the problem happens only when the ~ is at the end. If it is at
another place, or at the beginning, no problem as we see :
FTPClient
220 Service ready for new user.
-r-------- 1 user group 0 Mar 3 01:00 ~
-r-------- 1 user group 0 Mar 3 00:55 ~thencharacters
ANT
$ more toc.txt
-r-------- 1 user group 0 Mar 3 01:00 ~
-r-------- 1 user group 0 Mar 3 00:55 ~thencharacters
My ANT target is :
<target name="listing">
<ftp action="list"
listing="toc.txt"
server="localhost"
port="2121"
userid="anonymous"
password="anonymous"
remotedir=".">
<fileset dir="." defaultexcludes="no" includes="*" />
</ftp>
</target>
--
You are receiving this mail because:
You are the assignee for the bug.