diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2014-09-18 17:18:40 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2014-09-18 17:37:42 +0200 |
| commit | b6d31e959a957b25aae8b75569320e0ef8af4419 (patch) | |
| tree | ba941d7b1a6ffce2ee66cc2af36d9da9071f7b18 /editor.c | |
| parent | 2c5c662851fc49a9d2d3095b2711c4b3ba752a72 (diff) | |
| download | vis-b6d31e959a957b25aae8b75569320e0ef8af4419.tar.gz vis-b6d31e959a957b25aae8b75569320e0ef8af4419.tar.xz | |
Do only open an empty buffer if the file does not exist
Opening a file without having read permissions should fail.
Diffstat (limited to 'editor.c')
| -rw-r--r-- | editor.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -323,7 +323,7 @@ bool editor_window_new(Editor *ed, const char *filename) { if (original) text = original->text; else - text = text_load(filename && access(filename, R_OK) == 0 ? filename : NULL); + text = text_load(filename && access(filename, F_OK) == 0 ? filename : NULL); if (!text) return false; |
