You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2021/09/26 14:32:00 UTC
[jira] [Updated] (IO-721) Wrong exception message in
FileUtils.setLastModified(File, File)
[ https://issues.apache.org/jira/browse/IO-721?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary D. Gregory updated IO-721:
-------------------------------
Summary: Wrong exception message in FileUtils.setLastModified(File, File) (was: Wrong exception message in FileUtils.copyDirectory() tries to set last modified on source dir after update to 2.8.0)
> Wrong exception message in FileUtils.setLastModified(File, File)
> ----------------------------------------------------------------
>
> Key: IO-721
> URL: https://issues.apache.org/jira/browse/IO-721
> Project: Commons IO
> Issue Type: Bug
> Components: Utilities
> Affects Versions: 2.8.0
> Environment: Ubuntu 20.04 LTS
> Groovy 3.0.x
> Java 11 (from Ubuntu packages)
> Reporter: Dirk Heinrichs
> Priority: Major
> Fix For: 2.12.0
>
>
> A simple
> {code:java}
> FileUtils.copyDirectory(source, dest, glob) {code}
> works fine when using Commons-IO 2.7, but fails with
> {code:java}
> Caught: java.io.IOException: Failed setLastModified on /path/to/source
> java.io.IOException: Failed setLastModified on /path/to/source
> at org.apache.commons.io.FileUtils.setLastModified(FileUtils.java:2561)
> at org.apache.commons.io.FileUtils.doCopyDirectory(FileUtils.java:1361)
> at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:733)
> at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:659)
> at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:606)
> {code}
> after update to 2.8.0. From reading the documentation, it's also my understanding that "setLastModified()" should be executed on "dest" to set the same modification time as "source", but *not* on "source".
--
This message was sent by Atlassian Jira
(v8.3.4#803005)