inveniosoftware / invenio-files-rest

REST API for uploading/downloading files for Invenio.
https://invenio-files-rest.readthedocs.io
MIT License
9 stars 67 forks source link

files: avoid creating directories while opening files for reading #302

Closed psaiz closed 9 months ago

psaiz commented 9 months ago

:heart: Thank you for your contribution!

Description

Opening a file fails if the user does not have write permissions. The open seems to call mkdir, and that fails.

This patch avoids creating directories if the file is opened only for reading.