You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (JIRA)" <ji...@apache.org> on 2017/01/18 18:53:26 UTC

[jira] [Commented] (MSHADE-244) Avoid file copy and replacement when source and target files are the same file

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

Robert Scholte commented on MSHADE-244:
---------------------------------------

I need to know when this occurs to be able to write a proper unit test or integration test.

> Avoid file copy and replacement when source and target files are the same file
> ------------------------------------------------------------------------------
>
>                 Key: MSHADE-244
>                 URL: https://issues.apache.org/jira/browse/MSHADE-244
>             Project: Maven Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 2.4.3
>            Reporter: Diego Rivera
>            Priority: Blocker
>         Attachments: shade.no-replace.patch
>
>
> When Shade::replaceFile() is invoked, and the source and target are the same, no work should be performed since this can result in an attempt at copying the same file upon itself, and the target will end up as a 0-byte file.
> Instead, the proposed patch (attached) adds a check to perform a best-attempt intercept of that condition and avoid any unnecessary work.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)