lib/fog/external/models/storage/files.rb in fog-external-0.0.1 vs lib/fog/external/models/storage/files.rb in fog-external-0.0.2
- old
+ new
@@ -26,11 +26,12 @@
end
end
def head(id) # hackish!
requires :directory
- real_key = file_key(id)
- if data = connection.remote.list_files(directory.key).detect{|c|c[:key] == real_key}
+
+ data = connection.remote.head_file(file_key(id))
+ if data
new(data)
else
nil
end
end
\ No newline at end of file