dvolgyes / zenodo_get

Zenodo_get: Downloader for Zenodo records
GNU Affero General Public License v3.0
130 stars 21 forks source link

Download fails if file contains path #34

Open nichtich opened 6 days ago

nichtich commented 6 days ago

It looks like this script does not work properly with files in a path. For instance https://doi.org/10.5281/zenodo.4314355 contains a single file RGZM/samian-lod-2020-12-10.zip. Downloading it with

zenodo_get https://doi.org/10.5281/zenodo.4314355

fails with error in zget.py line 409:

    os.rename(filename, fname)
FileNotFoundError: [Errno 2] No such file or directory: 'samian-lod-2020-12-10.zip' -> 'RGZM/samian-lod-2020-12-10.zip'

The reason is a path (here RGZM) must be created first or rename fails.