parent
d01aafa5e9
commit
1cf99377dc
@ -78,7 +78,11 @@ module RemoteStorage
|
||||
end
|
||||
end
|
||||
|
||||
res = do_get_request("#{container_url_for(user)}/?format=json&path=#{escape(directory)}/")
|
||||
res = if directory.empty?
|
||||
do_get_request("#{container_url_for(user)}/?format=json")
|
||||
else
|
||||
do_get_request("#{container_url_for(user)}/?format=json&path=#{escape(directory)}/")
|
||||
end
|
||||
|
||||
if body = JSON.parse(res.body)
|
||||
listing = directory_listing(body)
|
||||
@ -278,8 +282,12 @@ module RemoteStorage
|
||||
end
|
||||
|
||||
def url_for_directory(user, directory)
|
||||
if directory.empty?
|
||||
container_url_for(user)
|
||||
else
|
||||
"#{container_url_for(user)}/#{escape(directory)}"
|
||||
end
|
||||
end
|
||||
|
||||
def base_url
|
||||
@base_url ||= settings.swift["host"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user