https://dev.arvados.org/https://dev.arvados.org/favicon.ico?15576888422014-10-22T21:29:09ZArvadosArvados - Bug #4285: [Workbench] Not found error when the view or download icons are clicked for a file in a subdir of a collection.https://dev.arvados.org/issues/4285?journal_id=167762014-10-22T21:29:09ZRadhika Chippadaradhika@curoverse.com
<ul></ul><p>Observed this issue while testing 4228:</p>
<p>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.</p>
<p><a class="external" href="https://workbench.qr1hi.arvadosapi.com/collections/e8987d293cba82b6618f0412a30c26cf+104/tmp5/yup.txt?disposition=inline&size=4">https://workbench.qr1hi.arvadosapi.com/collections/e8987d293cba82b6618f0412a30c26cf+104/tmp5/yup.txt?disposition=inline&size=4</a></p>
<p>This can be found in <a class="external" href="https://workbench.qr1hi.arvadosapi.com/collections/qr1hi-4zz18-w74zrwyvft9q81n">https://workbench.qr1hi.arvadosapi.com/collections/qr1hi-4zz18-w74zrwyvft9q81n</a></p>
<p>Another such collection: <a class="external" href="https://workbench.qr1hi.arvadosapi.com/collections/qr1hi-4zz18-74ikz4mn29q3i34">https://workbench.qr1hi.arvadosapi.com/collections/qr1hi-4zz18-74ikz4mn29q3i34</a></p> Arvados - Bug #4285: [Workbench] Not found error when the view or download icons are clicked for a file in a subdir of a collection.https://dev.arvados.org/issues/4285?journal_id=168722014-10-24T17:19:49ZTom Cleggtom@curii.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li><li><strong>Story points</strong> set to <i>0.5</i></li></ul> Arvados - Bug #4285: [Workbench] Not found error when the view or download icons are clicked for a file in a subdir of a collection.https://dev.arvados.org/issues/4285?journal_id=169282014-10-25T14:10:26ZRadhika Chippadaradhika@curoverse.com
<ul><li><strong>Assigned To</strong> set to <i>Radhika Chippada</i></li><li><strong>Target version</strong> changed from <i>Bug Triage</i> to <i>2014-10-29 sprint</i></li></ul> Arvados - Bug #4285: [Workbench] Not found error when the view or download icons are clicked for a file in a subdir of a collection.https://dev.arvados.org/issues/4285?journal_id=169462014-10-27T15:04:02ZBrett Smithbrett.smith@curii.com
<ul></ul><p>Reviewing <a class="changeset" title="4285: prepend './' to file path being retrieved when it is in a subdir in a collection." href="https://dev.arvados.org/projects/arvados/repository/arvados/revisions/f1eb092c311510b60b8c9b00b64407780e2a0302">f1eb092</a></p>
<p>I suggest writing the main fix as</p>
<pre><code class="ruby syntaxhl"><span class="n">file_name</span> <span class="o">=</span> <span class="n">params</span><span class="p">[</span><span class="ss">:file</span><span class="p">].</span><span class="nf">andand</span><span class="p">.</span><span class="nf">sub</span><span class="p">(</span><span class="sr">/^(\.\/|\/|)/</span><span class="p">,</span> <span class="s1">'./'</span><span class="p">)</span>
</code></pre>
<p>This version avoids prepending <code>./</code> if it's already specified, and writes <code>./</code> correctly if <code>params[:file]</code> starts with a <code>/</code>. It does add <code>./</code> for the single-file case, but that's okay according to the <a href="https://arvados.org/projects/arvados/wiki/Keep_manifest_format" class="external">Keep manifest documentation</a>.</p>
<p>If you're comfortable with this change, I'm happy to see it merged. Thanks.</p> Arvados - Bug #4285: [Workbench] Not found error when the view or download icons are clicked for a file in a subdir of a collection.https://dev.arvados.org/issues/4285?journal_id=169502014-10-27T15:39:05ZRadhika Chippadaradhika@curoverse.com
<ul></ul><p>Thanks Brett. I updated accordingly.</p> Arvados - Bug #4285: [Workbench] Not found error when the view or download icons are clicked for a file in a subdir of a collection.https://dev.arvados.org/issues/4285?journal_id=169522014-10-27T15:40:09ZRadhika Chippadaradhika@curoverse.com
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Resolved</i></li></ul><p>Applied in changeset arvados|commit:a3db87c5a23f3a1e72ea82304d24db8c1757c095.</p>