mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #32669 from darrenstahlmsft/FixTmpDelete
Fix tmp deletion
This commit is contained in:
commit
64932563c9
1 changed files with 1 additions and 1 deletions
|
@ -955,7 +955,7 @@ func prepareTempDir(rootDir string, rootUID, rootGID int) (string, error) {
|
|||
if tmpDir = os.Getenv("DOCKER_TMPDIR"); tmpDir == "" {
|
||||
tmpDir = filepath.Join(rootDir, "tmp")
|
||||
newName := tmpDir + "-old"
|
||||
if err := os.Rename(tmpDir, newName); err != nil {
|
||||
if err := os.Rename(tmpDir, newName); err == nil {
|
||||
go func() {
|
||||
if err := os.RemoveAll(newName); err != nil {
|
||||
logrus.Warnf("failed to delete old tmp directory: %s", newName)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue