[Groonga-commit] droonga/droonga-engine at a08253c [master] Set permissions to the file correctly

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Sep 25 18:23:54 JST 2014


YUKI Hiroshi	2014-09-25 18:23:54 +0900 (Thu, 25 Sep 2014)

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

  Message:
    Set permissions to the file correctly

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

  Modified: bin/droonga-engine-catalog-modify (+4 -4)
===================================================================
--- bin/droonga-engine-catalog-modify    2014-09-25 18:19:24 +0900 (4cf28bb)
+++ bin/droonga-engine-catalog-modify    2014-09-25 18:23:54 +0900 (9627169)
@@ -107,10 +107,10 @@ generator.modify(datasets)
 
 def open_output(path)
   if path == "-"
-    yield($stdout)
+    yield($stdout, nil)
   else
-    Droonga::SafeFileWriter.write(path) do |output|
-      yield(output)
+    Droonga::SafeFileWriter.write(path) do |output, file|
+      yield(output, file)
     end
   end
 end
@@ -118,7 +118,7 @@ end
 catalog = generator.generate
 open_output(options.output_path) do |output, file|
   output.puts(JSON.pretty_generate(catalog))
-  if options.for_service
+  if file and options.for_service
     service_installation.ensure_correct_file_permission(file)
   end
 end
-------------- next part --------------
HTML����������������������������...
Download 



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