Add typo in remove all. Ensure tmpDir is removed
This commit is contained in:
parent
0ef6fed5c7
commit
9de4590498
1 changed files with 3 additions and 2 deletions
|
@ -208,6 +208,8 @@ func (srv *Server) ImageExport(name string, out io.Writer) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer os.RemoveAll(tempdir)
|
||||
|
||||
utils.Debugf("Serializing %s", name)
|
||||
|
||||
rootRepo := srv.runtime.repositories.Repositories[name]
|
||||
|
@ -219,7 +221,7 @@ func (srv *Server) ImageExport(name string, out io.Writer) error {
|
|||
if err := os.Mkdir(tmpImageDir, os.ModeDir); err != nil {
|
||||
return err
|
||||
}
|
||||
defer os.RemoveAll(tempdir)
|
||||
defer os.RemoveAll(tmpImageDir)
|
||||
|
||||
var version = "1.0"
|
||||
var versionBuf = []byte(version)
|
||||
|
@ -277,7 +279,6 @@ func (srv *Server) ImageExport(name string, out io.Writer) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer os.RemoveAll(tempdir)
|
||||
|
||||
if _, err := io.Copy(out, fs); err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in a new issue