[jira] [Commented] (IO-769) FileUtils.copyFileToDirectory can lead to not accessible file when preserving the filedate
[ https://issues.apache.org/jira/browse/IO-769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17533042#comment-17533042 ] Michael Osipov commented on IO-769: --- At least something needs to changed. Either impl or docs. I'd expect behavior like {{cp -p}}. > 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: Jérémy Carnus >Priority: Major > > 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)
[jira] [Commented] (IO-769) FileUtils.copyFileToDirectory can lead to not accessible file when preserving the filedate
[ https://issues.apache.org/jira/browse/IO-769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17532490#comment-17532490 ] Jérémy Carnus commented on IO-769: -- I think that the COPY_ATTRIBUTES is not needed if the code is really calling setLastModified ? Or the doc should be update to mentions that all attributes will be copied > 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: Jérémy Carnus >Priority: Major > > 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)
[jira] [Commented] (IO-769) FileUtils.copyFileToDirectory can lead to not accessible file when preserving the filedate
[ https://issues.apache.org/jira/browse/IO-769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17532483#comment-17532483 ] Michael Osipov commented on IO-769: --- How do you expect to fix that? > 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: Jérémy Carnus >Priority: Major > > 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)