lib/dnote/format.rb in dnote-1.4.0 vs lib/dnote/format.rb in dnote-1.6.0

- old
+ new

@@ -100,10 +100,10 @@ $stderr << "(" + notes.counts.map{|l,n| "#{n} #{l}s"}.join(', ') + ")\n" end # def write(result, fname=nil) - if output.end_with?('/') || File.directory?(output) + if output.to_s[-1,1] == '/' || File.directory?(output) fmt = format.split('/').first ext = EXTENSIONS[fmt] || fmt file = File.join(output, fname || "notes.#{ext}") else file = output