Skip to content

IO.copyFile does not respect CopyOptions.overwrite #403

@dwickern

Description

@dwickern

The method is documented as "overwriting any existing content" but accepts a CopyOptions().withOverwrite(false) and then overwrites the file

/**
* Copies the contents of `sourceFile` to the location of `targetFile`, overwriting any existing content.
*
* See [[sbt.io.CopyOptions]] for docs on the options available.
*/
def copyFile(sourceFile: File, targetFile: File, options: CopyOptions): Unit =
copyFile(sourceFile, targetFile, options.preserveLastModified, options.preserveExecutable)

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