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
|
@ -242,7 +242,7 @@ int SrsHttpStaticServer::initialize()
|
|||
mount = srs_string_replace(mount, SRS_CONSTS_RTMP_DEFAULT_VHOST"/", "/");
|
||||
|
||||
// the dir mount must always ends with "/"
|
||||
if (mount != "/" && mount.rfind("/") != mount.length() - 1) {
|
||||
if (mount != "/" && !srs_string_ends_with(mount, "/")) {
|
||||
mount += "/";
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue