Bug #4285

[Workbench] Not found error when the view or download icons are clicked for a file in a subdir of a collection.

Added by Radhika Chippada almost 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Radhika Chippada
Category:
-
Target version:
Start date:
10/25/2014
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
0.5

Subtasks

Task #4319: Review branch: 4285-view-download-collection-subdir-filesResolvedRadhika Chippada


Related issues

Is duplicate of Arvados - Bug #4249: [Workbench] Can't view/download files that are retrievable from arv-getResolved10/17/2014

Associated revisions

Revision a3db87c5
Added by Radhika Chippada almost 5 years ago

closes #4285
Merge branch '4285-view-download-collection-subdir-files'

History

#1 Updated by Radhika Chippada almost 5 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.

https://workbench.qr1hi.arvadosapi.com/collections/e8987d293cba82b6618f0412a30c26cf+104/tmp5/yup.txt?disposition=inline&size=4

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

#2 Updated by Tom Clegg almost 5 years ago

  • Status changed from New to In Progress
  • Story points set to 0.5

#3 Updated by Radhika Chippada almost 5 years ago

  • Assigned To set to Radhika Chippada
  • Target version changed from Bug Triage to 2014-10-29 sprint

#4 Updated by Brett Smith almost 5 years ago

Reviewing f1eb092

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.

#5 Updated by Radhika Chippada almost 5 years ago

Thanks Brett. I updated accordingly.

#6 Updated by Radhika Chippada almost 5 years ago

  • Status changed from In Progress to Resolved

Applied in changeset arvados|commit:a3db87c5a23f3a1e72ea82304d24db8c1757c095.

Also available in: Atom PDF