Revert "Fix listing of a user's root directory"
This reverts commit 1cf99377dc7ecf26fd2d5b43c03f615d82876d13.
This commit is contained in:
parent
671d3d5fd5
commit
3ce3efd0fc
@ -78,11 +78,7 @@ module RemoteStorage
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
res = if directory.empty?
|
res = do_get_request("#{container_url_for(user)}/?format=json&path=#{escape(directory)}/")
|
||||||
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)
|
||||||
@ -282,12 +278,8 @@ module RemoteStorage
|
|||||||
end
|
end
|
||||||
|
|
||||||
def url_for_directory(user, directory)
|
def url_for_directory(user, directory)
|
||||||
if directory.empty?
|
|
||||||
container_url_for(user)
|
|
||||||
else
|
|
||||||
"#{container_url_for(user)}/#{escape(directory)}"
|
"#{container_url_for(user)}/#{escape(directory)}"
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
def base_url
|
def base_url
|
||||||
@base_url ||= settings.swift["host"]
|
@base_url ||= settings.swift["host"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user