mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-25 13:16:11 +03:00

In a [Discord thread](https://discord.com/channels/1005603569187160125/1319727495473397791) someone was having problems running Ghostty because they had accidentally created a directory called `~/.config/ghostty/config`. Instead of erroring out Ghostty would hang trying to "read" the directory. Crashes can also happen if the argument to `--config-file` on the CLI or a recursively loaded config file. This patch prevents those hangs or crashes by refusing to read anything but a plain file (symbolic links to plain files continue to work as well).