ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 53095] Copy issue ant 1.8.2 windows (Failed copy deletes targeted file even when copy is not attempted)
Date Fri, 29 Mar 2013 11:09:34 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=53095

bob <bsmith488@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bsmith488@gmail.com

--- Comment #2 from bob <bsmith488@gmail.com> ---
Simple steps to reproduce on XP:

C:\ant>ver

Microsoft Windows XP [Version 5.1.2600]

C:\ant>call java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode, sharing)

C:\ant>call ant -version
Apache Ant(TM) version 1.9.0 compiled on March 5 2013

C:\ant>type build.xml
<?xml version="1.0"?>
<project name="testcopy">
        <target name="testcopy">
                <copy verbose="true"
                          file="testfile"
                          todir="./temp"
                />
        </target>
</project>

C:\ant>mkdir temp

C:\ant>attrib -r testfile
File not found - testfile

C:\ant>attrib -r temp\testfile
File not found - temp\testfile

C:\ant>copy c:\WINDOWS\system32\winver.exe .\testfile
        1 file(s) copied.

C:\ant>copy c:\WINDOWS\system32\winver.exe .\temp\testfile
        1 file(s) copied.

C:\ant>ver > .\testfile :: update file

C:\ant>attrib -r testfile

C:\ant>attrib +r temp\testfile

C:\ant>echo :::: before
:::: before

C:\ant>attrib testfile
A          C:\ant\testfile

C:\ant>attrib temp\testfile
A    R     C:\ant\temp\testfile

C:\ant>call ant testcopy
Buildfile: C:\ant\build.xml

testcopy:
     [copy] Copying 1 file to C:\ant\temp
     [copy] Copying C:\ant\testfile to C:\ant\temp\testfile

BUILD FAILED
C:\ant\build.xml:7: Failed to copy C:\ant\testfile to C:\ant\temp\testfile due
to can't write to read-only destination file C:\ant\temp\testfile

Total time: 0 seconds

C:\ant>echo :::: after (where is temp\testfile ?)
:::: after (where is temp\testfile ?)

C:\ant>attrib testfile
A          C:\ant\testfile

C:\ant>attrib temp\testfile
File not found - temp\testfile

C:\ant>

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

Mime
View raw message