Navigation Menu

Skip to content

Commit

Permalink
Use dirname instead of parent
Browse files Browse the repository at this point in the history
Because the corresponded method of basename is dirname.
  • Loading branch information
kou committed Jun 25, 2014
1 parent d5b4dcb commit d0d73d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/droonga-engine-catalog-generate
Expand Up @@ -101,7 +101,7 @@ def open_output(path)
else
# Don't output the file directly to prevent loading of incomplete file!
path = Pathname(path).expand_path
Tempfile.open(path.basename.to_s, path.parent.to_s, "w") do |output|
Tempfile.open(path.basename.to_s, path.dirname.to_s, "w") do |output|
yield(output)
output.flush
File.rename(output.path, path.to_s)
Expand Down

0 comments on commit d0d73d2

Please sign in to comment.