Don't try to deserialize an object to check if it already exists (fixes #29)

This commit is contained in:
Garret Alfert
2013-09-13 19:10:32 +02:00
parent 1a2933bf48
commit 629ff399ff
2 changed files with 18 additions and 1 deletions

View File

@@ -90,7 +90,7 @@ module RemoteStorage
def put_data(user, directory, key, data, content_type=nil)
object = build_data_object(user, directory, key, data, content_type)
object_exists = !object.data.nil?
object_exists = !object.raw_data.nil?
existing_object_size = object_size(object)
timestamp = (Time.now.to_f * 1000).to_i