1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 18:38:12 +00:00

FileManager: Open non-executable files in TextEditor by default.

This commit is contained in:
Andreas Kling 2019-03-07 14:43:12 +01:00
parent ce35cddb1b
commit 3ee0e82206
2 changed files with 9 additions and 1 deletions

View file

@ -219,4 +219,12 @@ void DirectoryTableModel::activate(const GModelIndex& index)
}
return;
}
if (fork() == 0) {
int rc = execl("/bin/TextEditor", "/bin/TextEditor", path.string().characters(), nullptr);
if (rc < 0)
perror("exec");
ASSERT_NOT_REACHED();
}
return;
}