Merge pull request #1 from PearceDuan/master

bugfix for directory permission
This commit is contained in:
dexter
2020-05-21 14:15:33 +08:00
committed by GitHub
2 changed files with 4 additions and 3 deletions

3
.gitignore vendored
View File

@@ -1,2 +1,3 @@
node_modules 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 flag = flag | os.O_TRUNC | os.O_WRONLY
} }
filePath := filepath.Join(config.Path, streamPath+".flv") filePath := filepath.Join(config.Path, streamPath+".flv")
os.MkdirAll(path.Dir(filePath), 0666) os.MkdirAll(path.Dir(filePath), 0775)
file, err := os.OpenFile(filePath, flag, 0666) file, err := os.OpenFile(filePath, flag, 0775)
if err != nil { if err != nil {
return err return err
} }