Reduced count of directories (to make backups faster).

This commit is contained in:
Martin Edenhofer 2016-02-29 08:25:52 +01:00
parent 778cddda37
commit 77a351faaf

View file

@ -53,9 +53,9 @@ class Store::Provider::File
# generate directory # generate directory
base = "#{Rails.root}/storage/fs/" base = "#{Rails.root}/storage/fs/"
parts = sha.scan(/.{1,4}/) parts = sha.scan(/.{1,6}/)
path = parts[ 1..10 ].join('/') + '/' path = parts[ 1..6 ].join('/') + '/'
file = parts[ 11..parts.count ].join('') file = parts[ 7..parts.count ].join('')
location = "#{base}/#{path}" location = "#{base}/#{path}"
# create directory if not exists # create directory if not exists