Small code layout improvement.
This commit is contained in:
parent
a960793e72
commit
408bade61b
1 changed files with 4 additions and 4 deletions
|
@ -54,10 +54,10 @@ class Store::Provider::File
|
||||||
def self.get_locaton(sha)
|
def self.get_locaton(sha)
|
||||||
|
|
||||||
# generate directory
|
# generate directory
|
||||||
base = Rails.root.to_s + '/storage/fs/'
|
base = "#{Rails.root}/storage/fs/"
|
||||||
parts = sha.scan(/.{1,4}/)
|
parts = sha.scan(/.{1,4}/)
|
||||||
path = parts[ 1..10 ].join('/') + '/'
|
path = parts[ 1..10 ].join('/') + '/'
|
||||||
file = parts[ 11..parts.count ].join('')
|
file = parts[ 11..parts.count ].join('')
|
||||||
location = "#{base}/#{path}"
|
location = "#{base}/#{path}"
|
||||||
|
|
||||||
# create directory if not exists
|
# create directory if not exists
|
||||||
|
|
Loading…
Reference in a new issue