mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-22 10:36:24 +00:00
AK: Unbreak FileSystemPath after String::split() changes
FileSystemPath(".") should not have a title(). This was caught by the unit test for FileSystemPath, yay! :^)
This commit is contained in:
parent
e64c335e5a
commit
d66bbc21ce
|
@ -86,7 +86,7 @@ void FileSystemPath::canonicalize()
|
|||
|
||||
m_basename = canonical_parts.last();
|
||||
auto name_parts = m_basename.split('.');
|
||||
m_title = name_parts[0];
|
||||
m_title = name_parts.is_empty() ? String() : name_parts[0];
|
||||
if (name_parts.size() > 1)
|
||||
m_extension = name_parts[1];
|
||||
|
||||
|
|
Loading…
Reference in a new issue