[ 
https://issues.apache.org/jira/browse/IO-769?focusedWorklogId=806136&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-806136
 ]

ASF GitHub Bot logged work on IO-769:
-------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Sep/22 10:22
            Start Date: 05/Sep/22 10:22
    Worklog Time Spent: 10m 
      Work Description: kinow commented on PR #377:
URL: https://github.com/apache/commons-io/pull/377#issuecomment-1236816687

   >Notice that in the (old) Jira tickets above, two are about attributes not 
being copied, which we now do but this PR proposes to undo. So catch-22. Ideas?
   
   I think we should start by reverting the change from 2.9 with this PR, and 
prepare a new release. I was only suggesting that someone looks at the other 
JIRA issues to close if it is fixed by this PR, or leave it open for the next 
minor or major release, as needed.
   
   >So if this regression is not reverted, I'd at least advocate for an API 
which would make the above statement correct. The current behavior silently 
adds COPY_ATTRIBUTES, which removes the ability to control this flag.
   
   That sounds like a compromise. Probably one of the two would then have to be 
marked as deprecated. I don't have a large-enough Java code base that I am 
maintaining a the moment to measure the impact, so take my comments with a 
pinch of salt :slightly_smiling_face: No hard feelings if other options are 
chosen here :+1: 




Issue Time Tracking
-------------------

    Worklog Id:     (was: 806136)
    Time Spent: 50m  (was: 40m)

> FileUtils.copyFileToDirectory can lead to not accessible file when preserving 
> the file date
> -------------------------------------------------------------------------------------------
>
>                 Key: IO-769
>                 URL: https://issues.apache.org/jira/browse/IO-769
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 2.11.0
>            Reporter: Jérémy Carnus
>            Priority: Major
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Hi,
> The current implementation for copyFileToDirectory by default preserve the 
> file. 
> There 2 issues regarding this:
>  * the javadoc mentions this is done by File.setLastModified by in fact this 
> is done by the COPY_ATTRIBUTES options
>  * Under Windows, the COPY_ATTRIBUTES also copies the security attributes 
> (SID and permissions) and can lead to a file not beeing readable after copy 
> (if for example, you copie from a mount under docker or a shared folder)
>  



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

Reply via email to