diff options
| author | WormHeamer | 2025-12-28 16:34:05 -0500 |
|---|---|---|
| committer | WormHeamer | 2025-12-28 16:34:05 -0500 |
| commit | a8efb42232ab74fe2ef13a0160d2057c53ea2c83 (patch) | |
| tree | 46e2b0fcb21b26384d32dd5e714283c3de912fed | |
| parent | 743fd78aa296266c951e57b6b96c488204140820 (diff) | |
use O_CREAT in txt_load()
| -rw-r--r-- | txt.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -146,7 +146,7 @@ u32 txt_delete_c(Txt *b, u32 cur) { int txt_load(Txt *b, const char *path) { struct stat sb; - int fd = open(path, O_RDONLY); + int fd = open(path, O_RDONLY | O_CREAT); if (fd == -1) return -1; if (fstat(fd, &sb)) { close(fd); |
