
Work out the name each file will have on Zenodo
Source:R/archive-zenodo-upload.R
dot-zenodo_flat_names.RdZenodo has no folders. Its own documentation is explicit: "Zenodo does not
support uploading and organising files into folders/directories. Instead,
you can create a ZIP archive and upload it, in which case Zenodo will
display the file structure inside the ZIP." The API bears this out – the
bucket refuses a name containing "/" with a 404, the older form endpoint
silently rewrites code/02.R to code_02.R, and a file object carries no
path field at all.
Details
So a name has to be flat. Using the full relative path for every file makes
them needlessly long, when most files in a project have a unique name
anyway. This keeps the bare file name wherever it is unambiguous, and only
prefixes the ones that would otherwise collide – so analysis.R stays
analysis.R, while two README.md files become github__README.md and
data__README.md.