maven-wagon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r658126 - /maven/wagon/trunk/wagon-provider-api/src/main/java/org/apache/maven/wagon/StreamWagon.java
Date Tue, 20 May 2008 06:59:34 GMT
Author: brett
Date: Mon May 19 23:59:34 2008
New Revision: 658126

URL: http://svn.apache.org/viewvc?rev=658126&view=rev
Log:
[WAGON-90] The getIfNewer method fails to work if file doesn't exist locally

Modified:
    maven/wagon/trunk/wagon-provider-api/src/main/java/org/apache/maven/wagon/StreamWagon.java

Modified: maven/wagon/trunk/wagon-provider-api/src/main/java/org/apache/maven/wagon/StreamWagon.java
URL: http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-provider-api/src/main/java/org/apache/maven/wagon/StreamWagon.java?rev=658126&r1=658125&r2=658126&view=diff
==============================================================================
--- maven/wagon/trunk/wagon-provider-api/src/main/java/org/apache/maven/wagon/StreamWagon.java
(original)
+++ maven/wagon/trunk/wagon-provider-api/src/main/java/org/apache/maven/wagon/StreamWagon.java
Mon May 19 23:59:34 2008
@@ -94,7 +94,8 @@
 
         InputStream is = inputData.getInputStream();
 
-        if ( resource.getLastModified() > timestamp )
+        // always get if timestamp is 0 (ie, target doesn't exist), otherwise only if older
than the remote file
+        if ( timestamp == 0 || timestamp < resource.getLastModified() )
         {
             retValue = true;
 



---------------------------------------------------------------------
To unsubscribe, e-mail: wagon-commits-unsubscribe@maven.apache.org
For additional commands, e-mail: wagon-commits-help@maven.apache.org


Mime
View raw message