Reduced count of directories (to make backups faster).
This commit is contained in:
parent
778cddda37
commit
77a351faaf
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue