mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
use system utility for string finds
This commit is contained in:
parent
ca73534d7e
commit
d9f991ed2f
16 changed files with 111 additions and 112 deletions
|
@ -107,7 +107,7 @@ int SrsFlvSegment::open(bool use_tmp_file)
|
|||
bool fresh_flv_file = !srs_path_exists(path);
|
||||
|
||||
// create dir first.
|
||||
std::string dir = path.substr(0, path.rfind("/"));
|
||||
std::string dir = srs_path_dirname(path);
|
||||
if ((ret = srs_create_dir_recursively(dir)) != ERROR_SUCCESS) {
|
||||
srs_error("create dir=%s failed. ret=%d", dir.c_str(), ret);
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue