You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Jeremy (Jira)" <ji...@apache.org> on 2022/05/05 18:18:00 UTC
[jira] [Created] (IO-769) FileUtils.copyFileToDirectory can lead to not accessible file when preserving the filedate
Jeremy created IO-769:
-------------------------
Summary: FileUtils.copyFileToDirectory can lead to not accessible file when preserving the filedate
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: Jeremy
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.7#820007)