diff options
| author | Quentin Carbonneaux | 2014-08-12 14:16:09 -0400 |
|---|---|---|
| committer | Quentin Carbonneaux | 2014-08-12 14:16:09 -0400 |
| commit | 797fdfae2871064aef5fcb0782ed109d963dca3e (patch) | |
| tree | db2f013579bdd442cf1c2668fa4fc8012f75805f | |
| parent | 262a71f2d871419b68c1477ae222ffe37e051216 (diff) | |
trivial bug in ex_get
| -rw-r--r-- | exec.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -95,17 +95,17 @@ ex_get(EBuf *eb, char *file) struct stat st; char *file1; - if (eb->path && strcmp(eb->path, file) != 0) - if (eb->frev != eb_revision(eb)) { - errstr = "file not written"; - return 1; - } if (!file) file = eb->path; if (!file) { errstr = "no file to read from"; return 1; } + if (eb->path && strcmp(eb->path, file) != 0) + if (eb->frev != eb_revision(eb)) { + errstr = "file not written"; + return 1; + } fd = open(file, O_RDONLY); if (fd == -1) { errstr = "cannot open file"; |
