You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Yair Zaslavsky (JIRA)" <ji...@apache.org> on 2016/11/09 02:01:58 UTC

[jira] [Commented] (IO-517) FileUtils#copyDirectory cannot copy directory structure

    [ https://issues.apache.org/jira/browse/IO-517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15649525#comment-15649525 ] 

Yair Zaslavsky commented on IO-517:
-----------------------------------

I wrote the following test:

    @Test
    public void testFoo() {

        File f = new File("/tmp/yair\\directory");
        f.mkdirs();

    }

And it manage to create me a directory called yair\directory under tmp.
If you look at the source code of  doCopyDirectory you will see that this is the method being used.
I also saw that the original reporter of the bug you stated at Jenkins thinks it might be an issue of Windows mount.
I think it's wort verifying.




> FileUtils#copyDirectory cannot copy directory structure
> -------------------------------------------------------
>
>                 Key: IO-517
>                 URL: https://issues.apache.org/jira/browse/IO-517
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 2.4
>         Environment: Linux OS
>            Reporter: Thomas Fürer
>
> Have a directory structure like ..\users/domain\username and would copy the folder users with all subfolders and files. the problem now is that domain\username is a folder which is generated by ldap connecting the domain and the username with a backslash.
> {code}
> java.io.IOException: Destination '/var/lib/jenkins_backup_mnt/FULL-2016-11-07_11-00/users/domain\username' directory cannot be created
> at org.apache.commons.io.FileUtils.doCopyDirectory(FileUtils.java:1416)
> at org.apache.commons.io.FileUtils.doCopyDirectory(FileUtils.java:1426)
> at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:1389)
> at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:1310)
> {code}
> https://issues.jenkins-ci.org/browse/JENKINS-39546



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)