1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-13 11:51:57 +00:00

RTC: Create file if not exists for append

This commit is contained in:
winlin 2020-07-18 09:49:27 +08:00
parent 1beb24b48d
commit 2934673d3f

View file

@ -81,7 +81,7 @@ srs_error_t SrsFileWriter::open_append(string p)
return srs_error_new(ERROR_SYSTEM_FILE_ALREADY_OPENED, "file %s already opened", path.c_str());
}
int flags = O_APPEND|O_WRONLY;
int flags = O_CREAT|O_APPEND|O_WRONLY;
mode_t mode = S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH;
if ((fd = _srs_open_fn(p.c_str(), flags, mode)) < 0) {