You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/09/01 11:26:00 UTC

[jira] [Work logged] (IO-769) FileUtils.copyFileToDirectory can lead to not accessible file when preserving the file date

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

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

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

   Hi @tresf 
   Thank you for taking the time and putting in the effort to create this PR as well as explaining the issue clearly here and on the development mailing list.
   
   I'd like feedback from the community. @kinow ? @chtompki ?




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

            Worklog Id:     (was: 805480)
    Remaining Estimate: 0h
            Time Spent: 10m

> 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: 10m
>  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)