1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

fix #179: dvr support custom filepath by variables. 2.0.87

This commit is contained in:
winlin 2015-01-03 12:54:54 +08:00
parent f89941254a
commit f881bc43b5
10 changed files with 215 additions and 27 deletions

View file

@ -951,16 +951,12 @@ int SrsHlsMuxer::create_dir()
app_dir += app;
// TODO: cleanup the dir when startup.
mode_t mode = S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IWGRP|S_IXGRP|S_IROTH|S_IXOTH;
if (::mkdir(app_dir.c_str(), mode) < 0) {
if (errno != EEXIST) {
ret = ERROR_HLS_CREATE_DIR;
srs_error("create app dir %s failed. ret=%d", app_dir.c_str(), ret);
return ret;
}
if ((ret = srs_create_dir_recursively(app_dir)) != ERROR_SUCCESS) {
srs_error("create app dir %s failed. ret=%d", app_dir.c_str(), ret);
return ret;
}
srs_info("create app dir %s success.", app_dir.c_str());
srs_info("create app dir %s ok", app_dir.c_str());
return ret;
}