From b6e03db1ea4d2dcfe91bbe909ddf4e37c35ca9bb Mon Sep 17 00:00:00 2001 From: Steven Polley Date: Fri, 30 Jun 2023 19:56:25 -0600 Subject: [PATCH] more appropriate function name --- processFiles.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/processFiles.go b/processFiles.go index a7b8944..7be5f7c 100644 --- a/processFiles.go +++ b/processFiles.go @@ -37,7 +37,7 @@ func moveBuildArtifacts() bool { newROMs = true log.Printf("new build found - moving file %s", v.Name()) romCache.Lock() // lock to prevent multiple concurrent goroutines moving the same file - err := moveBuildFile(fmt.Sprintf("%s/%s", buildOutDirectory, v.Name()), fmt.Sprintf("%s/%s", romDirectory, v.Name())) + err := copyThenDeleteFile(fmt.Sprintf("%s/%s", buildOutDirectory, v.Name()), fmt.Sprintf("%s/%s", romDirectory, v.Name())) romCache.Unlock() if err != nil { log.Printf("failed to move file '%s' from out to rom directory: %v", v.Name(), err) @@ -82,7 +82,7 @@ func isLineageROMZip(v fs.DirEntry) (bool, []string) { // A custom "move file" function because in docker container the mounted folders are different overlay filesystems // Instead of os.Rename, we must copy and delete -func moveBuildFile(src, dst string) error { +func copyThenDeleteFile(src, dst string) error { sourceFileStat, err := os.Stat(src) if err != nil { return err