michael-o commented on code in PR #212:
URL: https://github.com/apache/maven-resolver/pull/212#discussion_r1011466776


##########
maven-resolver-transport-wagon/src/main/java/org/eclipse/aether/transport/wagon/WagonTransporter.java:
##########
@@ -548,35 +530,25 @@ public void run( Wagon wagon )
                     {
                         throw new IOException( String.format( "Failure 
creating file '%s'.", dst.getAbsolutePath() ) );
                     }
-                    if ( file == null )
+
+                    if ( file != null )
                     {
-                        readTempFile( dst );
+                        Files.move( dst.toPath(), file.toPath(), 
StandardCopyOption.ATOMIC_MOVE );

Review Comment:
   This will fail when `$TMP` is used which is almost always another volume 
compared to the target file. Atomic moves work on the same volume/mount point.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to