projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '4310-git-tag-race' closes #4310
[arvados.git]
/
apps
/
workbench
/
app
/
controllers
/
collections_controller.rb
diff --git
a/apps/workbench/app/controllers/collections_controller.rb
b/apps/workbench/app/controllers/collections_controller.rb
index b484df36318eb609ef3ba94d84d55eaa29c749e7..e869824be415d57cc0eddc8d1ee15fa50698eb04 100644
(file)
--- a/
apps/workbench/app/controllers/collections_controller.rb
+++ b/
apps/workbench/app/controllers/collections_controller.rb
@@
-146,8
+146,7
@@
class CollectionsController < ApplicationController
coll = Collection.find(params[:uuid])
end
coll = Collection.find(params[:uuid])
end
- file_name = params[:file]
- file_name = ('./' + file_name) if (file_name and file_name.include?('/'))
+ file_name = params[:file].andand.sub(/^(\.\/|\/|)/, './')
if usable_token.nil?
return # Response already rendered.
elsif file_name.nil? or not coll.manifest.has_file?(file_name)
if usable_token.nil?
return # Response already rendered.
elsif file_name.nil? or not coll.manifest.has_file?(file_name)