diff options
Diffstat (limited to 'text.c')
| -rw-r--r-- | text.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -713,7 +713,7 @@ Text *text_load(const char *filename) { if (fstat(txt->fd, &txt->info) == -1) goto out; if (!S_ISREG(txt->info.st_mode)) { - errno = EISDIR; + errno = S_ISDIR(txt->info.st_mode) ? EISDIR : ENOTSUP; goto out; } // XXX: use lseek(fd, 0, SEEK_END); instead? |
