From bc8eadc65a8ab78436747e070fbbffb6f61d9b1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lilian=20J=C3=B3nsd=C3=B3ttir?= Date: Wed, 19 Jun 2024 22:43:35 -0700 Subject: [PATCH] weird spacing --- internal/trash/trash.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/internal/trash/trash.go b/internal/trash/trash.go index e6efd01..75b0a4d 100644 --- a/internal/trash/trash.go +++ b/internal/trash/trash.go @@ -139,13 +139,15 @@ func Remove(files []Info) (removed int, err error) { } func TrashFile(trashDir, name string) error { - outdir := filepath.Join(trashDir, "files") - trashout := filepath.Join(trashDir, "info") + var ( + outdir = filepath.Join(trashDir, "files") + trashout = filepath.Join(trashDir, "info") + filename = filepath.Base(name) + ) - filename := filepath.Base(name) trashinfo_filename := filepath.Join(trashout, filename+trash_info_ext) - out_path := filepath.Join(outdir, filename) + if err := os.Rename(name, out_path); err != nil { return err }