diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-11-15 12:14:29 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-11-15 12:14:29 +0900 |
commit | 61f68f607367293d0edb5c297094da1d83cd7fcb (patch) | |
tree | 86df363af18e135fd89d7461255e7b9758d40e23 /wrapper.c | |
parent | Merge branch 'ma/bisect-leakfix' (diff) | |
parent | wrapper.c: consistently quote filenames in error messages (diff) | |
download | tgif-61f68f607367293d0edb5c297094da1d83cd7fcb.tar.xz |
Merge branch 'sr/wrapper-quote-filenames'
Some error messages did not quote filenames shown in it, which have
been fixed.
* sr/wrapper-quote-filenames:
wrapper.c: consistently quote filenames in error messages
Diffstat (limited to 'wrapper.c')
-rw-r--r-- | wrapper.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -569,7 +569,7 @@ static int warn_if_unremovable(const char *op, const char *file, int rc) if (!rc || errno == ENOENT) return 0; err = errno; - warning_errno("unable to %s %s", op, file); + warning_errno("unable to %s '%s'", op, file); errno = err; return rc; } @@ -583,7 +583,7 @@ int unlink_or_msg(const char *file, struct strbuf *err) if (!rc || errno == ENOENT) return 0; - strbuf_addf(err, "unable to unlink %s: %s", + strbuf_addf(err, "unable to unlink '%s': %s", file, strerror(errno)); return -1; } @@ -653,9 +653,9 @@ void write_file_buf(const char *path, const char *buf, size_t len) { int fd = xopen(path, O_WRONLY | O_CREAT | O_TRUNC, 0666); if (write_in_full(fd, buf, len) < 0) - die_errno(_("could not write to %s"), path); + die_errno(_("could not write to '%s'"), path); if (close(fd)) - die_errno(_("could not close %s"), path); + die_errno(_("could not close '%s'"), path); } void write_file(const char *path, const char *fmt, ...) |