authorgravatar for kris.tate+github@gmail.comkristopher tate <kris.tate+github@gmail.com> 2018-09-13 23:34:01+09:00
committergravatar for kris.tate+github@gmail.comkristopher tate <kris.tate+github@gmail.com> 2018-09-13 23:34:01+09:00
log6d0a122816fabec6e7ef212c743fa22d7f38433e
tree4623aaffdd0d179877aff57082a2d9f3fbd26acc
parente70c543bc4c097d7c3287feb0f233a13d4dc3829
signaturelock-open Commit is signed but in an unrecognized format.

src/cache_hash.cpp: support file paths that contain spaces;

ref: #1510

1 files changed, 10 insertions(+), 0 deletions(-)

src/cache_hash.cpp+10
......@@ -337,6 +337,16 @@ Error cache_hit(CacheHash *ch, Buf *out_digest) {
337337 return ErrorInvalidFormat;
338338 }
339339
340 // We should be at the last item,
341 // so switch from iterating on spaces ' ' to newlines '\n'
342 // First, check to make sure we have the runway to do so:
343 if (it.index == it.buffer.len) {
344 os_file_close(ch->manifest_file);
345 return ErrorInvalidFormat;
346 }
347 it.index++;
348 // Too close for missiles, I’m switching to guns
349 it.split_bytes = str("\n");
340350 Optional<Slice<uint8_t>> opt_file_path = SplitIterator_next(&it);
341351 if (!opt_file_path.is_some) {
342352 os_file_close(ch->manifest_file);