[Groonga-commit] droonga/droonga-engine at b423bcd [master] Output catalog.json correctly

Back to archive index

YUKI Hiroshi null+****@clear*****
Tue May 27 17:19:01 JST 2014


YUKI Hiroshi	2014-05-27 17:19:01 +0900 (Tue, 27 May 2014)

  New Revision: b423bcd893bd5abd627127bf213e77b7585e5b7d
  https://github.com/droonga/droonga-engine/commit/b423bcd893bd5abd627127bf213e77b7585e5b7d

  Message:
    Output catalog.json correctly

  Modified files:
    bin/droonga-engine-catalog-generate

  Modified: bin/droonga-engine-catalog-generate (+3 -2)
===================================================================
--- bin/droonga-engine-catalog-generate    2014-05-27 17:14:55 +0900 (888f439)
+++ bin/droonga-engine-catalog-generate    2014-05-27 17:19:01 +0900 (1bf4b7f)
@@ -101,10 +101,11 @@ def open_output(path)
   else
     # Don't output the file directly to prevent loading of incomplete file!
     path = Pathname(path)
-    Tempfile.open(path.basename.to_s, path.parent.to_s, "w") do |output|
+    temp_file = Tempfile.open(path.basename.to_s, path.parent.to_s, "w") do |output|
       yield(output)
+      output.path
     end
-    File.rename(temp_file.path, path.to_s)
+    File.rename(temp_file, path.to_s)
   end
 end
 
-------------- next part --------------
HTML����������������������������...
Télécharger 



More information about the Groonga-commit mailing list
Back to archive index