[ 
https://issues.apache.org/jira/browse/MSHADE-244?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Scholte updated MSHADE-244:
----------------------------------
    Attachment: MSHADE-244_selfReplace.patch

Patch with my IT attached. I really need a reproducable situation, otherwise 
this could become code with might get lost with refactoring. As safe as it me 
look, if any future developer removes the code and confirms it is still working 
(due to a missing test) some might have regression.
In other words, the proposed patch is incomplete to me.

> 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: MSHADE-244_selfReplace.patch, 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)

Reply via email to