diff options
| author | Quentin Carbonneaux | 2014-08-11 17:47:08 -0400 |
|---|---|---|
| committer | Quentin Carbonneaux | 2014-08-11 17:47:08 -0400 |
| commit | f18cd5260641ba7bb9157e4030aa2af68c9f966e (patch) | |
| tree | 2423bf8d515d9819d148687ca4faaa04b1495d8e | |
| parent | 2e4047d0ce3beccde0a1756ad861744b8e764944 (diff) | |
fail in get if current file is dirty
| -rw-r--r-- | exec.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -95,6 +95,11 @@ 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) { |
