[Workbench] Not found error when the view or download icons are clicked for a file in a subdir of a collection.
#1 Updated by Radhika Chippada almost 6 years ago
Observed this issue while testing 4228:
Not only are we getting empty collections when combining files that are in a directory or sub-directory in a collection; we are getting "Not found" errors when such a file is downloaded or viewed.
This can be found in https://workbench.qr1hi.arvadosapi.com/collections/qr1hi-4zz18-w74zrwyvft9q81n
Another such collection: https://workbench.qr1hi.arvadosapi.com/collections/qr1hi-4zz18-74ikz4mn29q3i34
#4 Updated by Brett Smith almost 6 years ago
I suggest writing the main fix as
file_name = params[:file].andand.sub(/^(\.\/|\/|)/, './')
This version avoids prepending
./ if it's already specified, and writes
./ correctly if
params[:file] starts with a
/. It does add
./ for the single-file case, but that's okay according to the Keep manifest documentation.
If you're comfortable with this change, I'm happy to see it merged. Thanks.