From 6019a6089ad1d5c464c72b54534ba1b5e094f330 Mon Sep 17 00:00:00 2001 From: Karel Picman Date: Fri, 2 Jun 2017 14:57:53 +0200 Subject: [PATCH] Absolute paths are left unchaged #733 --- app/models/dmsf_file.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/dmsf_file.rb b/app/models/dmsf_file.rb index 46679c7c..6bdd5877 100644 --- a/app/models/dmsf_file.rb +++ b/app/models/dmsf_file.rb @@ -105,7 +105,8 @@ class DmsfFile < ActiveRecord::Base if path.blank? path = 'dmsf' else - path.strip! + pn = Pathname.new(path) + return pn if pn.absolute? end Rails.root.join(path) end