RTC: Create file if not exists for append

pull/1908/head
winlin 5 years ago
parent 1beb24b48d
commit 2934673d3f

@ -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) {

Loading…
Cancel
Save