import: Avoid using some strange names for temporary keys

The ContentIdentifier can contain almost anything, so could have characters
that are not fit for the filesystem, or might be longer than a key usually
is, or contain a newline, or .... genKeyName deals with those problems.

This should not present a back-compat issue, because this is a temporary
key used while downloading the imported file, before the real key for it
can be generated.
This commit is contained in:
Joey Hess 2020-06-11 16:07:36 -04:00
parent 0017d9a347
commit 8a7c615a8f
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 26 additions and 1 deletions

View file

@ -0,0 +1,23 @@
[[!comment format=mdwn
username="joey"
subject="""comment 1"""
date="2020-06-11T19:46:25Z"
content="""
Is this about HOME being on the FS, or about git-annex test being run
inside the FS?
It looks to me to be the latter, since the file it fails
on is in .git/annex/tmp
2020-06-10T16:02:41.4916599Z .git/annex/tmp/CID-s16--24892 16 1591804960 : openBinaryFile: invalid argument (Invalid argument)
Might this filesystem have trouble with filenames with spaces,
particularly trailing spaces? That's kind of weird, and I've changed it so
it won't contain those spaces.
Also this line just after the FAIL seems relevant. (I suspect
the log might not have every line in the right order, like maybe stdout and
stderr are being read independantly and written to the log.)
2020-06-10T16:02:41.5278208Z Exception: import: getSymbolicLinkStatus: does not exist (No such file or directory)
"""]]