Fix Windows build
This commit is contained in:
@@ -4,7 +4,6 @@ package litestream
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
"syscall"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// fileinfo returns syscall fields from a FileInfo object.
|
// fileinfo returns syscall fields from a FileInfo object.
|
||||||
@@ -15,7 +14,7 @@ func fileinfo(fi os.FileInfo) (uid, gid int) {
|
|||||||
// fixRootDirectory is copied from the standard library for use with mkdirAll()
|
// fixRootDirectory is copied from the standard library for use with mkdirAll()
|
||||||
func fixRootDirectory(p string) string {
|
func fixRootDirectory(p string) string {
|
||||||
if len(p) == len(`\\?\c:`) {
|
if len(p) == len(`\\?\c:`) {
|
||||||
if IsPathSeparator(p[0]) && IsPathSeparator(p[1]) && p[2] == '?' && IsPathSeparator(p[3]) && p[5] == ':' {
|
if os.IsPathSeparator(p[0]) && os.IsPathSeparator(p[1]) && p[2] == '?' && os.IsPathSeparator(p[3]) && p[5] == ':' {
|
||||||
return p + `\`
|
return p + `\`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user