diff --git a/lib/xml-sitemap/map.rb b/lib/xml-sitemap/map.rb index ae5b1ff..328df1b 100644 --- a/lib/xml-sitemap/map.rb +++ b/lib/xml-sitemap/map.rb @@ -123,7 +123,7 @@ def render_to(path, options={}) path = File.expand_path(path) path << ".gz" unless path =~ /\.gz\z/i if compress - if File.exists?(path) && !overwrite + if File.exist?(path) && !overwrite raise RuntimeError, "File already exists and not overwritable!" end