Skip to content

Commit

Permalink
storage_local: Fix incorrect validation clauses
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmo0920 committed Apr 22, 2016
1 parent b90d479 commit 6c138c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/fluent/plugin/storage_local.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def configure(conf)
super

@on_memory = false
if !@path && !@_plugin_id_configured
if !@path || !@_plugin_id_configured
if @autosave || @persistent
raise Fluent::ConfigError, "Plugin @id or path for <storage> required to save data"
else
Expand Down Expand Up @@ -54,7 +54,7 @@ def configure(conf)
raise Fluent::ConfigError, "Unexpected error: failed to read data from plugin storage file: '#{@path}'"
end
else
raise Fluent::ConfigError, "Directory is not writable for plugin storage file '#{@path}'" unless File.writable?(@path)
raise Fluent::ConfigError, "Directory is not writable for plugin storage file '#{dir}'" unless File.writable?(dir)
end
end
end
Expand Down

0 comments on commit 6c138c9

Please sign in to comment.