mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-26 03:38:47 +00:00
`switch_cut_path()` scanned for `/`, then restarted from the start of the string for `\`, so whenever the last `\` came before the last `/` the result still held `/`-separated components. Search for the last `/` first, then for the last `\` in what follows it, so the result is always what comes after the final separator, as documented. Adds mixed-separator cases to `test_switch_cut_path_strips_directory_components`.