Skip to content

sh.Copy does not close destination file descriptor #222

Closed
@jonasrmichel

Description

The sh.Copy function successfully closes the source file descriptor, but leaves the destination file descriptor open when the function returns.

On Windows, this causes an error if the destination file is later deleted. The following error is produced.

The process cannot access the file because it is being used by another process.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions