mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
TextEditor: Include extension during SaveAs
When we save-as in the text editor we now auto-populate GFilePicker /w the current name & extension.
This commit is contained in:
@@ -37,6 +37,11 @@ void FileSystemPath::canonicalize()
|
||||
}
|
||||
|
||||
m_basename = canonical_parts.last();
|
||||
auto name_parts = m_basename.split('.');
|
||||
m_title = name_parts[0];
|
||||
if (name_parts.size() > 1)
|
||||
m_extension = name_parts[1];
|
||||
|
||||
StringBuilder builder(approximate_canonical_length);
|
||||
for (auto& cpart : canonical_parts) {
|
||||
builder.append('/');
|
||||
|
||||
Reference in New Issue
Block a user