HackStudio: Don't take LexicalPath as argument

Also make use of LexicalPath::has_extension() in one place.
This commit is contained in:
Andreas Kling 2020-12-15 11:58:28 +01:00
parent 4befc2c282
commit d410449d87
Notes: sideshowbarker 2024-07-19 00:49:14 +09:00
4 changed files with 19 additions and 17 deletions

View file

@ -38,7 +38,7 @@ ProjectFile::ProjectFile(const String& name)
GUI::TextDocument& ProjectFile::document() const
{
if (!m_document) {
m_document = CodeDocument::create(LexicalPath(m_name));
m_document = CodeDocument::create(m_name);
auto file_or_error = Core::File::open(m_name, Core::File::ReadOnly);
if (file_or_error.is_error()) {
warnln("Couldn't open '{}': {}", m_name, file_or_error.error());