diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-14 20:41:17 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-14 20:41:17 +0200 |
commit | f4c60740bdbb107a8b6362ec5577333983c9af1b (patch) | |
tree | c859cbc7f31c885be95c5895c437e35ce3b8f5e2 | |
parent | 953669374c1d5c723db9e1b959044760fa1b9842 (diff) | |
download | serenity-f4c60740bdbb107a8b6362ec5577333983c9af1b.zip |
AK: Make FileSystemPath::extension() return what's after the last '.'
-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) { |