You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2017/01/25 15:18:29 UTC

[Bug 60644] New: non-detected self-copy sets all file sizes to zero length (directory sym-link)

https://bz.apache.org/bugzilla/show_bug.cgi?id=60644

            Bug ID: 60644
           Summary: non-detected self-copy sets all file sizes to zero
                    length  (directory sym-link)
           Product: Ant
           Version: 1.9.4
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
          Assignee: notifications@ant.apache.org
          Reporter: hauser@acm.org
  Target Milestone: ---

if the ant copy task attempts to

  copy /dir/file.png /dir/file.png

we see in the output:
   [copy] Skipping self-copy of /dir/file.png

and all is fine.
-------------------------------
If we do

  ln -s /dir /dir1


and the ant copy task attempts to

  copy /dir/file.png /dir1/file.png

then no waring appears and

  ls -lart /dir?/file.png
  -rw-r--r-- 1 me me 0 Jan 25 16:06 /dir/file.png
  -rw-r--r-- 1 me me 0 Jan 25 16:06 /dir1/file.png

==> all files are emptied!



debian stable

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 60644] non-detected self-copy sets all file sizes to zero length (directory sym-link)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60644

--- Comment #2 from Jaikiran Pai <ja...@apache.org> ---
A PR containing a fix has been issued https://github.com/apache/ant/pull/37

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 60644] non-detected self-copy sets all file sizes to zero length (directory sym-link)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60644

Jaikiran Pai <ja...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #3 from Jaikiran Pai <ja...@apache.org> ---
This is now fixed in 1.9.x and master branch of Ant. The fix will be available
in the next release(s).

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 60644] non-detected self-copy sets all file sizes to zero length (directory sym-link)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60644

Jaikiran Pai <ja...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |1.9.10

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 60644] non-detected self-copy sets all file sizes to zero length (directory sym-link)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60644

--- Comment #1 from Ralf Hauser <ha...@acm.org> ---
the same happens if 

/dir and /dir1 are different, but

ln -s /dir/file.png /dir1/file.png

and then ant copy is

   copy /dir/file.png /dir1/file.png

then the file ends up with size zero   :(

-- 
You are receiving this mail because:
You are the assignee for the bug.