mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Also call #load in case of missing local root folder.
This commit is contained in:
parent
155c4503ed
commit
e15c4a377e
1 changed files with 4 additions and 5 deletions
|
@ -10,17 +10,16 @@ module Fog
|
|||
model Fog::Storage::Local::Directory
|
||||
|
||||
def all
|
||||
if ::File.directory?(service.local_root)
|
||||
data = Dir.entries(service.local_root).select do |entry|
|
||||
data = if ::File.directory?(service.local_root)
|
||||
Dir.entries(service.local_root).select do |entry|
|
||||
entry[0...1] != '.' && ::File.directory?(service.path_to(entry))
|
||||
end.map do |entry|
|
||||
{:key => entry}
|
||||
end
|
||||
load(data)
|
||||
else
|
||||
clear
|
||||
self
|
||||
[]
|
||||
end
|
||||
load(data)
|
||||
end
|
||||
|
||||
def get(key, options = {})
|
||||
|
|
Loading…
Reference in a new issue