operations: fix Overlapping test for Windows native paths

This commit is contained in:
Nick Craig-Wood
2019-02-28 11:39:32 +00:00
parent 52c6b373cc
commit e3bceb9083
3 changed files with 7 additions and 2 deletions

View File

@@ -10,6 +10,7 @@ import (
"io/ioutil"
"net/http"
"path"
"path/filepath"
"sort"
"strconv"
"strings"
@@ -543,7 +544,7 @@ func Overlapping(fdst, fsrc fs.Info) bool {
}
// Return the Root with a trailing / if not empty
fixedRoot := func(f fs.Info) string {
s := strings.Trim(f.Root(), "/")
s := strings.Trim(filepath.ToSlash(f.Root()), "/")
if s != "" {
s += "/"
}