Skip to content

race condition in FileUtils.copyFile() #47

Open
@gregallen

Description

@gregallen

in a parallel multi-module maven build, running copy-dependencies with a shared output directory...

more than one module may attempt to copy the file at once. The length check can then fail since it sees the size of the partially copied new file.

suggest using the return value from nio Files copyFile, which is the number of bytes copied. can be safely compared against the size of the source file.

also, you can surely rip out the old pre-nio code and drop java 6 support?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions