ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 28735] New: - Copy and sync don't allow for low-resolution file times (SMB)
Date Mon, 03 May 2004 06:52:48 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28735>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28735

Copy and sync don't allow for low-resolution file times (SMB)

           Summary: Copy and sync don't allow for low-resolution file times
                    (SMB)
           Product: Ant
           Version: 1.6.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: stoledo@tau.ac.il


Copy and sync report a file out-of-date (and copy it) if the lastModified of the
source is higher, even by 1 millisecond. When I sync an NTFS file system with a
network share services by Samba (Samba 3 going to an ext2 or ext3 linux file
system), the file time returned by the share is always a whole second, and when
Ant tries to set the lastModified after a copy, the file time gets rounded down,
so the source again looks newer by a few milliseconds. You should probably allow
for at least 1 second fudge, at least as an option to resource-age comparisons.
Here is a printout from a sync operation; I modified the sources to show the
file times and difference; when I run this example, the file gets copied over
and over again:

C:\Documents and Settings\stoledo\Desktop\Projects\workspace3\myfiles_mirror>ant
-verbose
Unable to locate tools.jar. Expected to find it in C:\Program
Files\Java\j2re1.4.2_04\lib\tools.jar
Apache Ant version 1.6.1 compiled on May 3 2004
Buildfile: build.xml
Detected Java version: 1.4 in: C:\Program Files\Java\j2re1.4.2_04
Detected OS: Windows XP
parsing buildfile C:\Documents and
Settings\stoledo\Desktop\Projects\workspace3\myfiles_mirror\build.xml with URI =
file:///C:/Documents%20a
nd%20Settings/stoledo/Desktop/Projects/workspace3/myfiles_mirror/build.xml
Project base dir set to: C:\Documents and
Settings\stoledo\Desktop\Projects\workspace3\myfiles_mirror
Build sequence for target `pc-sivan-talks' is [pc-sivan-talks]
Complete build sequence is [pc-sivan-talks, pc-sivan-tools, pc-sivan-library,
pc-sivan-courses, pc-sivan, pc-sivan-family, netapp-talks, tem
p, ]

pc-sivan-talks:
     [sync] zurich-feb-02.txt added as zurich-feb-02.txt is outdated (sivan;
diff=106 milliseconds, source=1075713040106 target=107571304000
0 milliseconds)
     [sync] Copying 1 file to \\pc-sivan\localdisk\home\stoledo\swift\Talks
     [sync] Copying C:\pc-sivan\Talks\zurich-feb-02.txt to
\\pc-sivan\localdisk\home\stoledo\swift\Talks\zurich-feb-02.txt
     [sync] NO dangling directory to remove from
\\pc-sivan\localdisk\home\stoledo\swift\Talks
     [sync] NO dangling file to remove from
\\pc-sivan\localdisk\home\stoledo\swift\Talks
     [sync] NO empty directory to remove from
\\pc-sivan\localdisk\home\stoledo\swift\Talks

BUILD SUCCESSFUL

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message