about summary refs log tree commit homepage
path: root/lib/mogilefs/new_file/common.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2012-10-30 23:12:10 +0000
committerEric Wong <normalperson@yhbt.net>2012-10-30 23:12:10 +0000
commit9b1339dfe76e04e4a21d39301d2236859dc03bfd (patch)
treea8bc5998b08b3ed4eb2ef0f21703e7bb1d4fbffa /lib/mogilefs/new_file/common.rb
parent42abd93b948881afe5c3e9d04ceb5f40fda4472c (diff)
downloadmogilefs-client-9b1339dfe76e04e4a21d39301d2236859dc03bfd.tar.gz
This lets us send unsupported/new arguments to plugins
and matches the functionality of the Perl client library.
Diffstat (limited to 'lib/mogilefs/new_file/common.rb')
-rw-r--r--lib/mogilefs/new_file/common.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/mogilefs/new_file/common.rb b/lib/mogilefs/new_file/common.rb
index 1d2b1a0..b901f67 100644
--- a/lib/mogilefs/new_file/common.rb
+++ b/lib/mogilefs/new_file/common.rb
@@ -35,6 +35,8 @@ module MogileFS::NewFile::Common
   end
 
   def create_close(devid, uri, bytes_uploaded)
+    close_args = @opts[:create_close_args]
+
     dest_info = @opts[:info] ||= {}
     dest_info["fid"] = @opts[:fid].to_i
     dest_info["key"] = @opts[:key]
@@ -62,7 +64,7 @@ module MogileFS::NewFile::Common
     # twice will hurt us...
     backend.noop
 
-    backend.create_close(dest_info)
+    backend.create_close(close_args ? close_args.merge(dest_info) : dest_info)
 
     # make this look like file_info + get_uris
     dest_info.delete(:checksumverify)