mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Utility functions, status messages and model list
Ref T247 follow up
This commit is contained in:
committed by
Mat Sutcliffe
parent
5c870a8404
commit
fd1f6bcc84
@@ -169,7 +169,7 @@ namespace BlackMisc
|
||||
QString CFileUtils::lastPathSegment(const QString &path)
|
||||
{
|
||||
if (path.isEmpty()) { return {}; }
|
||||
if (path.endsWith('/')) { return CFileUtils::lastPathSegment(path.left(path.length() - 1)); }
|
||||
if (path.endsWith('/')) { return CFileUtils::lastPathSegment(path.left(path.length() - 1)); }
|
||||
if (!path.contains('/')) { return path; }
|
||||
return path.mid(path.lastIndexOf('/') + 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user