Skip to content

Commit

Permalink
Refactored DeleteAllPlots() function
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkFighterLuke committed Apr 3, 2021
1 parent 2f3382e commit c113ae2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions dataHandlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit c113ae2

Please sign in to comment.