diff options
Diffstat (limited to 'AK/FileSystemPath.cpp')
-rw-r--r-- | AK/FileSystemPath.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/AK/FileSystemPath.cpp b/AK/FileSystemPath.cpp index fe93ccee66..ef0e824d7b 100644 --- a/AK/FileSystemPath.cpp +++ b/AK/FileSystemPath.cpp @@ -88,7 +88,7 @@ void FileSystemPath::canonicalize() auto name_parts = m_basename.split('.'); m_title = name_parts.is_empty() ? String() : name_parts[0]; if (name_parts.size() > 1) - m_extension = name_parts[1]; + m_extension = name_parts.last(); StringBuilder builder(approximate_canonical_length); for (size_t i = 0; i < canonical_parts.size(); ++i) { |