bugs/error out on file size 0 from external spec remotegit-annexhttp://git-annex.branchable.com/bugs/error_out_on_file_size_0_from_external_spec_remote/git-annexikiwiki2022-06-09T21:53:05Zcomment 1http://git-annex.branchable.com/bugs/error_out_on_file_size_0_from_external_spec_remote/comment_1_6af7ba08e93349b2c6176f91ba25a06f/joey2022-06-09T17:38:42Z2022-06-09T17:34:31Z
<p>I can reproduce this with a directory special remote, initialized with</p>
<pre><code>git annex initremote d type=directory directory=../d encryption=shared chunk=100MiB
</code></pre>
<p>The chunking is what causes the problem.</p>
comment 2http://git-annex.branchable.com/bugs/error_out_on_file_size_0_from_external_spec_remote/comment_2_1d78459554bc12d0423a317bd9f466d1/joey2022-06-09T18:25:05Z2022-06-09T18:05:15Z
<p>This was broken by <a href="http://source.git-annex.branchable.com/?p=source.git;a=commitdiff;h=dad4be97c2057db1ef3a13bb983d1701a90c9069">dad4be97c2057db1ef3a13bb983d1701a90c9069</a>.</p>
<p>For a key of size zero, <code>addspeculative</code> adds on a <code>[]</code> to the list of chunk
key. But that causes retrieveChunks to think that it's already retrieved
all the chunks, so it avoids doing any retrieval, so the file is not
written. It needs to retrieve the empty key even though it's empty,
so it can decrypt it when it's encrypted; git-annex does not special case
empty file retrieval.</p>
<p>Odd that testremote did not detect this. It does test with empty keys, and
with chunking.</p>
comment 3http://git-annex.branchable.com/bugs/error_out_on_file_size_0_from_external_spec_remote/comment_3_aa083a54e0c77cdba9939a061b509488/yarikoptic2022-06-09T21:53:05Z2022-06-09T21:53:05Z
<blockquote><p>fixed in <a href="https://git.kitenet.net/index.cgi/git-annex.git/commit/?id=13fc6a9b6ad4f0ee0a783c91825ab7ad35dd2b64">10.20220525-73-g13fc6a9b6</a> --<a href="http://git-annex.branchable.com/users/yarikoptic/">yarikoptic</a></p></blockquote>
<p>PS I wish there was a similar but automated annotation of those <code>[done]</code> to know actually "when/with what"</p>