From dc8d6679307c1121d8128d8e4fda40300226dcda Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Sat, 13 May 2023 12:50:26 +0000 Subject: [PATCH] fix: filename is already full path --- cache/cache.go | 2 +- cache/cache_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cache/cache.go b/cache/cache.go index 02caec0..b9930c4 100644 --- a/cache/cache.go +++ b/cache/cache.go @@ -82,5 +82,5 @@ func DownloadDebianCache(cachePath string) (err error) { return } - return os.Rename(filepath.Join(tmp, resp.Filename), cachePath) + return os.Rename(resp.Filename, cachePath) } diff --git a/cache/cache_test.go b/cache/cache_test.go index b203082..e834ebd 100644 --- a/cache/cache_test.go +++ b/cache/cache_test.go @@ -29,7 +29,7 @@ func TestDownloadQemuImage(t *testing.T) { } func TestDownloadDebianCache(t *testing.T) { - tmp, err := ioutil.TempDir("", "out-of-tree_") + tmp, err := fs.TempDir() if err != nil { return }