Skip to content

Conversation

@alessio-perugini
Copy link
Contributor

Issue

When trying to copy the same file from src to dst the CopyTo functions truncate
the dst file.

Example:
src=dst=/tmp/a

/tmp/a -> content: "hello"
src.CopyTo(dst)
/tmp/a -> content: ""

New behaviour

Copying an existing file to the same directory throws an error.

@alessio-perugini alessio-perugini self-assigned this Sep 15, 2023
@alessio-perugini alessio-perugini added the type: bug Perceived defect in any part of project label Sep 15, 2023
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.43% 🎉

Comparison is base (7d88805) 71.95% compared to head (38b01d1) 72.39%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #24      +/-   ##
==========================================
+ Coverage   71.95%   72.39%   +0.43%     
==========================================
  Files           6        6              
  Lines         353      355       +2     
==========================================
+ Hits          254      257       +3     
+ Misses         67       66       -1     
  Partials       32       32              
Flag Coverage Δ
unit 72.39% <100.00%> (+0.43%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
paths.go 64.08% <100.00%> (+0.95%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alessio-perugini alessio-perugini merged commit 225b25c into master Sep 21, 2023
@alessio-perugini alessio-perugini deleted the fix-copy-to-bug branch September 21, 2023 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug Perceived defect in any part of project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants