[ 
https://issues.apache.org/jira/browse/MRESOLVER-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17627572#comment-17627572
 ] 

ASF GitHub Bot commented on MRESOLVER-282:
------------------------------------------

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.





> Drop PartialFile
> ----------------
>
>                 Key: MRESOLVER-282
>                 URL: https://issues.apache.org/jira/browse/MRESOLVER-282
>             Project: Maven Resolver
>          Issue Type: Task
>          Components: Resolver
>            Reporter: Tamas Cservenak
>            Priority: Major
>             Fix For: 1.9.0
>
>
> Drop {{PartialFile}} that may cause locking issues, the drawback is to loose 
> "resumable downloads". 
> Also, clear up the temp file usage around it, and simplify resource handling.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to