diff --git a/app/models/store/provider/file.rb b/app/models/store/provider/file.rb index 5cef6bc93..b127d784f 100644 --- a/app/models/store/provider/file.rb +++ b/app/models/store/provider/file.rb @@ -24,8 +24,8 @@ class Store::Provider::File # generate directory base = Rails.root.to_s + '/storage/fs/' parts = sha.scan(/.{1,4}/) - path = parts[ 1 .. 10 ].join('/') + '/' - file = parts[ 11 .. parts.count ].join('') + path = parts[ 1..10 ].join('/') + '/' + file = parts[ 11..parts.count ].join('') location = "#{base}/#{path}" # create directory if not exists