Frederic Bouvier:
If the input string of sgSplitPath is empty, it returned a list with one empty string, not an empty list.
This commit is contained in:
parent
a611b70087
commit
00e0e72bca
@ -189,7 +189,8 @@ string_list sgPathSplit( const string &search_path ) {
|
|||||||
result.push_back( tmp.substr(0, index) );
|
result.push_back( tmp.substr(0, index) );
|
||||||
tmp = tmp.substr( index + 1 );
|
tmp = tmp.substr( index + 1 );
|
||||||
} else {
|
} else {
|
||||||
result.push_back( tmp );
|
if ( !tmp.empty() )
|
||||||
|
result.push_back( tmp );
|
||||||
done = true;
|
done = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user