lib/dav4rack/resource.rb in dav4rack-0.2.3 vs lib/dav4rack/resource.rb in dav4rack-0.2.4
- old
+ new
@@ -232,10 +232,10 @@
token = UUIDTools::UUID.random_create.to_s
lock = @lock_class.generate(@path, @user, token)
lock.scope = args[:scope]
lock.kind = args[:type]
lock.owner = args[:owner]
- lock.depth = args[:depth].to_i
+ lock.depth = args[:depth].is_a?(Symbol) ? args[:depth] : args[:depth].to_i
if(args[:timeout])
lock.timeout = args[:timeout] <= @max_timeout && args[:timeout] > 0 ? args[:timeout] : @max_timeout
else
lock.timeout = @default_timeout
end