Remove Windows support

Unfortunately, I don't have the expertise or bandwidth to maintain
the Windows support in Litestream. I'm open to re-adding support in
the future but right now it is hindering development and is not
well-tested or well-used.
This commit is contained in:
Ben Johnson
2022-02-05 08:11:21 -07:00
parent 4349398ff5
commit 8009bcf654
7 changed files with 13 additions and 183 deletions

View File

@@ -132,7 +132,7 @@ func MkdirAll(path string, mode os.FileMode, uid, gid int) error {
if j > 1 {
// Create parent.
err = MkdirAll(fixRootDirectory(path[:j-1]), mode, uid, gid)
err = MkdirAll(path[:j-1], mode, uid, gid)
if err != nil {
return err
}
@@ -154,6 +154,15 @@ func MkdirAll(path string, mode os.FileMode, uid, gid int) error {
return nil
}
// Fileinfo returns syscall fields from a FileInfo object.
func Fileinfo(fi os.FileInfo) (uid, gid int) {
if fi == nil {
return -1, -1
}
stat := fi.Sys().(*syscall.Stat_t)
return int(stat.Uid), int(stat.Gid)
}
// ParseSnapshotPath parses the index from a snapshot filename. Used by path-based replicas.
func ParseSnapshotPath(s string) (index int, err error) {
a := snapshotPathRegex.FindStringSubmatch(s)