cleanup after commit

This commit is contained in:
celogeek 2022-03-02 16:33:03 +01:00
parent 5e553b4a89
commit 8a8a6e50b4
Signed by: celogeek
GPG Key ID: E6B7BDCFC446233A

View File

@ -117,5 +117,13 @@ func (s *Store) CommitTemp(path string, sumb []string) error {
return err return err
} }
} }
return nil
for _, sb := range sumb {
dir := s.Dir(tmpdir, sb)
filename := filepath.Join(dir, sb)
if err := os.Remove(filename); err != nil {
return err
}
}
return os.RemoveAll(filepath.Join(s.Path, tmpdir))
} }