bugfix for directory permission

This commit is contained in:
pearceduan
2020-05-21 13:02:08 +08:00
parent 9dc6be8ad1
commit b7b9d2b8a2
2 changed files with 4 additions and 3 deletions

3
.gitignore vendored
View File

@@ -1,2 +1,3 @@
node_modules
.vscode
.vscode
.idea

4
flv.go
View File

@@ -35,8 +35,8 @@ func SaveFlv(streamPath string, append bool) error {
flag = flag | os.O_TRUNC | os.O_WRONLY
}
filePath := filepath.Join(config.Path, streamPath+".flv")
os.MkdirAll(path.Dir(filePath), 0666)
file, err := os.OpenFile(filePath, flag, 0666)
os.MkdirAll(path.Dir(filePath), 0775)
file, err := os.OpenFile(filePath, flag, 0775)
if err != nil {
return err
}