From c113ae2f5a3a52bbbb6ae81595e16c52d06aecd9 Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Sat, 3 Apr 2021 16:39:36 +0200 Subject: [PATCH] Refactored DeleteAllPlots() function --- dataHandlers.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dataHandlers.go b/dataHandlers.go index 823b674..de98de5 100644 --- a/dataHandlers.go +++ b/dataHandlers.go @@ -800,8 +800,6 @@ func DeleteFile(filename string) error { // Deletes plots folder and recreates it func DeleteAllPlots(folder string) { - path, _ := os.Getwd() - path = path + "/" + folder - os.RemoveAll(path) - os.Mkdir(path, 0755) + os.RemoveAll(folder) + os.Mkdir(folder, 0755) }