|
@@ -5,7 +5,6 @@ import (
|
|
|
"path/filepath"
|
|
|
"regexp"
|
|
|
"strconv"
|
|
|
- "strings"
|
|
|
"sync"
|
|
|
"syscall"
|
|
|
"time"
|
|
@@ -122,20 +121,6 @@ func mkdirWithACL(name string, sddl string) error {
|
|
|
return nil
|
|
|
}
|
|
|
|
|
|
-// IsAbs is a platform-specific wrapper for filepath.IsAbs. On Windows,
|
|
|
-// golang filepath.IsAbs does not consider a path \windows\system32 as absolute
|
|
|
-// as it doesn't start with a drive-letter/colon combination. However, in
|
|
|
-// docker we need to verify things such as WORKDIR /windows/system32 in
|
|
|
-// a Dockerfile (which gets translated to \windows\system32 when being processed
|
|
|
-// by the daemon. This SHOULD be treated as absolute from a docker processing
|
|
|
-// perspective.
|
|
|
-func IsAbs(path string) bool {
|
|
|
- if filepath.IsAbs(path) || strings.HasPrefix(path, string(os.PathSeparator)) {
|
|
|
- return true
|
|
|
- }
|
|
|
- return false
|
|
|
-}
|
|
|
-
|
|
|
// The origin of the functions below here are the golang OS and windows packages,
|
|
|
// slightly modified to only cope with files, not directories due to the
|
|
|
// specific use case.
|