From 273a1b3fe215053b7d07b6154664bf9eaf9efb75 Mon Sep 17 00:00:00 2001 From: just-hms Date: Sat, 21 Sep 2024 12:35:51 +0200 Subject: [PATCH] fix: lastFile not refreshing info --- cmd/mv.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/mv.go b/cmd/mv.go index 96d7e7a..736ae15 100644 --- a/cmd/mv.go +++ b/cmd/mv.go @@ -47,13 +47,13 @@ func waitForDownload(logger logx.Logger, downloadPath string) (fs.FileInfo, erro } sourcePath := filepath.Join(downloadPath, lastFile.Name()) - lastFile, err = os.Stat(sourcePath) - if err != nil { - return nil, err - } waited := false for osx.IsLocked(sourcePath) { + lastFile, err = os.Stat(sourcePath) + if err != nil { + return nil, err + } waited = true spinner.Spin("Downloading " + osx.Size(lastFile)) time.Sleep(100 * time.Millisecond)