[
https://issues.apache.org/jira/browse/IO-769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17713778#comment-17713778
]
Gary D. Gregory edited comment on IO-769 at 4/18/23 9:51 PM:
-------------------------------------------------------------
Merged [https://github.com/apache/commons-io/pull/377, see the PR for
behavior.|https://github.com/apache/commons-io/pull/377]
For the upcoming 2.12.0, COPY_ATTRIBUTES is no longer used by default.
was (Author: garydgregory):
Merged [https://github.com/apache/commons-io/pull/377, see the PR for
behavior.|https://github.com/apache/commons-io/pull/377]
COPY_ATTRIBUTES is no longer used by default.
> 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
> Fix For: 2.12.0
>
> Time Spent: 1h 20m
> 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)