mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #12082 from spzala/automated-cherry-pick-of-#11945-upstream-release-3.3
Automated cherry pick of #11945
This commit is contained in:
commit
0b74a4dbdb
@ -18,5 +18,10 @@ package fileutil
|
|||||||
|
|
||||||
import "os"
|
import "os"
|
||||||
|
|
||||||
|
const (
|
||||||
|
// PrivateDirMode grants owner to make/remove files inside the directory.
|
||||||
|
PrivateDirMode = 0700
|
||||||
|
)
|
||||||
|
|
||||||
// OpenDir opens a directory for syncing.
|
// OpenDir opens a directory for syncing.
|
||||||
func OpenDir(path string) (*os.File, error) { return os.Open(path) }
|
func OpenDir(path string) (*os.File, error) { return os.Open(path) }
|
||||||
|
@ -21,6 +21,11 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// PrivateDirMode grants owner to make/remove files inside the directory.
|
||||||
|
PrivateDirMode = 0777
|
||||||
|
)
|
||||||
|
|
||||||
// OpenDir opens a directory in windows with write access for syncing.
|
// OpenDir opens a directory in windows with write access for syncing.
|
||||||
func OpenDir(path string) (*os.File, error) {
|
func OpenDir(path string) (*os.File, error) {
|
||||||
fd, err := openDir(path)
|
fd, err := openDir(path)
|
||||||
|
@ -29,8 +29,6 @@ import (
|
|||||||
const (
|
const (
|
||||||
// PrivateFileMode grants owner to read/write a file.
|
// PrivateFileMode grants owner to read/write a file.
|
||||||
PrivateFileMode = 0600
|
PrivateFileMode = 0600
|
||||||
// PrivateDirMode grants owner to make/remove files inside the directory.
|
|
||||||
PrivateDirMode = 0700
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user