mirror of
https://git.freecumextremist.com/grumbulon/pomme.git
synced 2024-12-22 17:20:44 +00:00
remove tmp file after saving to permanent directory
This commit is contained in:
parent
08eab3e6cb
commit
a572f6841f
1 changed files with 4 additions and 0 deletions
|
@ -302,6 +302,10 @@ func (zone *ZoneRequest) Save() error {
|
|||
if err = f.Close(); err != nil {
|
||||
logHandler(genericResponseFields{"message": "Error closing file", "error": err.Error()})
|
||||
}
|
||||
|
||||
if err = os.Remove(filepath.Clean(tmpPath)); err != nil {
|
||||
logHandler(genericResponseFields{"message": "Error removing tmp file", "error": err.Error()})
|
||||
}
|
||||
}()
|
||||
|
||||
b, err := io.ReadAll(f)
|
||||
|
|
Loading…
Reference in a new issue