mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 01:37:34 +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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue