diff options
| author | Rose Hogenson <rosehogenson@posteo.net> | 2025-04-15 07:18:47 -0700 |
|---|---|---|
| committer | Rose Hogenson <rosehogenson@posteo.net> | 2025-04-15 07:18:47 -0700 |
| commit | c07a77034a0436ea98613623d1ab6511ad88ce6d (patch) | |
| tree | 3bd57b522e456b412fb355691fb8ec29570f9fc2 /internal/cp | |
| parent | 0ea041f4bf34d00d267db923a1d9f6de7f18b643 (diff) | |
| download | ccp-c07a77034a0436ea98613623d1ab6511ad88ce6d.tar.zst | |
Don't wait for size calculation
This can sometimes cause the progress bar not to render, but it also
prevents a mysterious lag on exit if the size calculation ends up taking
longer than the copy itself
Diffstat (limited to 'internal/cp')
| -rw-r--r-- | internal/cp/cp.go | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/internal/cp/cp.go b/internal/cp/cp.go index 2558419..da164f4 100644 --- a/internal/cp/cp.go +++ b/internal/cp/cp.go @@ -201,12 +201,9 @@ func (c *copier) copySymlink(src FSPath, dst FSPath) error { // interface. If force is specified and an existing destination file cannot be // opened, Copy will remove it and try again. func Copy(progress Progress, srcs []FSPath, dstRoot FSPath, force bool) { - done := make(chan struct{}) go func() { - defer close(done) progress.Max(size(srcs)) }() - defer func() { <-done }() dstIsDir := true if len(srcs) == 1 { |
