From b5d5dc19fcc52064baa96e9ca41eb127a7e06cac Mon Sep 17 00:00:00 2001 From: "geemus (Wesley Beary)" Date: Mon, 8 Mar 2010 16:19:48 -0800 Subject: [PATCH] fix the thing I just broke :( --- lib/fog/aws/models/s3/files.rb | 6 +++--- lib/fog/rackspace/models/files/files.rb | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/fog/aws/models/s3/files.rb b/lib/fog/aws/models/s3/files.rb index b73eb0175..d4d9a8763 100644 --- a/lib/fog/aws/models/s3/files.rb +++ b/lib/fog/aws/models/s3/files.rb @@ -14,12 +14,12 @@ module Fog def all(options = {}) merge_attributes(options) - directory = directory.collection.get( + parent = directory.collection.get( directory.name, options ) - if directory - load(directory.files.map {|file| file.attributes}) + if parent + load(parent.files.map {|file| file.attributes}) else nil end diff --git a/lib/fog/rackspace/models/files/files.rb b/lib/fog/rackspace/models/files/files.rb index 375be0632..2bf770aa8 100644 --- a/lib/fog/rackspace/models/files/files.rb +++ b/lib/fog/rackspace/models/files/files.rb @@ -13,12 +13,12 @@ module Fog def all(options = {}) merge_attributes(options) - directory = directory.collection.get( + parent = directory.collection.get( directory.name, options ) - if directory - load(directory.files.map {|file| file.attributes}) + if parent + load(parent.files.map {|file| file.attributes}) else nil end