Use database owner/group

This commit is contained in:
Ben Johnson
2021-01-11 09:39:08 -07:00
parent 9828b4c1dd
commit bcdb553267
5 changed files with 115 additions and 13 deletions

23
litestream_windows.go Normal file
View File

@@ -0,0 +1,23 @@
// +build windows
package litestream
import (
"os"
"syscall"
)
// fileinfo returns syscall fields from a FileInfo object.
func fileinfo(fi os.FileInfo) (uid, gid int) {
return -1, -1
}
// fixRootDirectory is copied from the standard library for use with mkdirAll()
func fixRootDirectory(p string) string {
if len(p) == len(`\\?\c:`) {
if IsPathSeparator(p[0]) && IsPathSeparator(p[1]) && p[2] == '?' && IsPathSeparator(p[3]) && p[5] == ':' {
return p + `\`
}
}
return p
}