1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

pkg/system: make EnsureRemoveAll unix-specific

The tricks performed by EnsureRemoveAll only make sense for Linux and
other Unices, so separate it out, and make EnsureRemoveAll for Windows
just an alias of os.RemoveAll.

This makes sure RecursiveUnmount is not called on Windows.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin 2020-09-21 01:21:24 -07:00
parent 4ce3d71c1a
commit 2502db66d0
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,5 @@
// +build !windows
package system // import "github.com/docker/docker/pkg/system"
import (

6
pkg/system/rm_windows.go Normal file
View file

@ -0,0 +1,6 @@
package system
import "os"
// EnsureRemoveAll is an alias to os.RemoveAll on Windows
var EnsureRemoveAll = os.RemoveAll