From f4c60740bdbb107a8b6362ec5577333983c9af1b Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 14 May 2020 20:41:17 +0200 Subject: [PATCH] AK: Make FileSystemPath::extension() return what's after the last '.' --- AK/FileSystemPath.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {