parent
d01aafa5e9
commit
1cf99377dc
@ -78,7 +78,11 @@ module RemoteStorage
|
|||||||
end
|
end
|
||||||
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)
|
if body = JSON.parse(res.body)
|
||||||
listing = directory_listing(body)
|
listing = directory_listing(body)
|
||||||
@ -278,7 +282,11 @@ module RemoteStorage
|
|||||||
end
|
end
|
||||||
|
|
||||||
def url_for_directory(user, directory)
|
def url_for_directory(user, directory)
|
||||||
"#{container_url_for(user)}/#{escape(directory)}"
|
if directory.empty?
|
||||||
|
container_url_for(user)
|
||||||
|
else
|
||||||
|
"#{container_url_for(user)}/#{escape(directory)}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def base_url
|
def base_url
|
||||||
|
Loading…
x
Reference in New Issue
Block a user