aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/longpath/longpath.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/longpath/longpath.go')
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/longpath/longpath.go26
1 files changed, 0 insertions, 26 deletions
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/longpath/longpath.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/longpath/longpath.go
deleted file mode 100644
index 9b15bff..0000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/longpath/longpath.go
+++ /dev/null
@@ -1,26 +0,0 @@
1// longpath introduces some constants and helper functions for handling long paths
2// in Windows, which are expected to be prepended with `\\?\` and followed by either
3// a drive letter, a UNC server\share, or a volume identifier.
4
5package longpath
6
7import (
8 "strings"
9)
10
11// Prefix is the longpath prefix for Windows file paths.
12const Prefix = `\\?\`
13
14// AddPrefix will add the Windows long path prefix to the path provided if
15// it does not already have it.
16func AddPrefix(path string) string {
17 if !strings.HasPrefix(path, Prefix) {
18 if strings.HasPrefix(path, `\\`) {
19 // This is a UNC path, so we need to add 'UNC' to the path as well.
20 path = Prefix + `UNC` + path[1:]
21 } else {
22 path = Prefix + path
23 }
24 }
25 return path
26}