[Groonga-commit] droonga/droonga-engine at e24d665 [master] Set permission to the generated file correctly

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Sep 25 18:37:16 JST 2014


YUKI Hiroshi	2014-09-25 18:37:16 +0900 (Thu, 25 Sep 2014)

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

  Message:
    Set permission to the generated file correctly

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

  Modified: bin/droonga-engine-catalog-generate (+4 -4)
===================================================================
--- bin/droonga-engine-catalog-generate    2014-09-25 18:23:54 +0900 (dfe7b0d)
+++ bin/droonga-engine-catalog-generate    2014-09-25 18:37:16 +0900 (8e24a40)
@@ -117,10 +117,10 @@ end
 
 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
@@ -128,7 +128,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