prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  RSS_PATH doesn't work as advertised (is path and filename, excluding .xml)
  * Python Version: 3.5.3
  * Nikola Version: v7.8.14
  * Operating System: Debian
  
  A fresh config says:
  
  ```
  # Final location for the blog main RSS feed is:
  # output / TRANSLATION[lang] / RSS_PATH / rss.xml
  ```
  
  which is in line with other `_PATH` variables.
  
  But it seems `RSS_PATH` is actually path+filename (and `.xml` is appended).
  
  With `RSS_PATH = "blog/`I get `render_taxonomies:output/blog/.xml` (instead of `blog/rss.xml`)
  
  With `RSS_PATH = blog/index.xml` I get `render_taxonomies:output/blog/index.xml.xml`
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `nikola/plugins/task/indexes.py`
  Content:
  ```
  1 # -*- coding: utf-8 -*-
  2 
  3 # Copyright © 2012-2018 Roberto Alsina and others.
  4 
  5 # Permission is hereby granted, free of charge, to any
  6 # person obtaining a copy of this software and associated
  7 # documentation files (the "Software"), to deal in the
  8 # Software without restriction, including without limitation
  9 # the rights to use, copy, modify, merge, publish,
  10 # distribute, sublicense, and/or sell copies of the
  11 # Software, and to permit persons to whom the Software is
  12 # furnished to do so, subject to the following conditions:
  13 #
  14 # The above copyright notice and this permission notice
  15 # shall be included in all copies or substantial portions of
  16 # the Software.
  17 #
  18 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
  19 # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  20 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  21 # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
  22 # OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
  23 # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  24 # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  25 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  26 
  27 """Render the blog's main index."""
  28 
  29 
  30 from nikola.plugin_categories import Taxonomy
  31 
  32 
  33 class Indexes(Taxonomy):
  34     """Classify for the blog's main index."""
  35 
  36     name = "classify_indexes"
  37 
  38     classification_name = "index"
  39     overview_page_variable_name = None
  40     more_than_one_classifications_per_post = False
  41     has_hierarchy = False
  42     show_list_as_index = True
  43     template_for_single_list = "index.tmpl"
  44     template_for_classification_overview = None
  45     apply_to_posts = True
  46     apply_to_pages = False
  47     omit_empty_classifications = False
  48     path_handler_docstrings = {
  49         'index_index': False,
  50         'index': """Link to a numbered index.
  51 
  52 Example:
  53 
  54 link://index/3 => /index-3.html""",
  55         'index_atom': """Link to a numbered Atom index.
  56 
  57 Example:
  58 
  59 link://index_atom/3 => /index-3.atom""",
  60         'index_rss': """A link to the RSS feed path.
  61 
  62 Example:
  63 
  64 link://rss => /blog/rss.xml""",
  65     }
  66 
  67     def set_site(self, site):
  68         """Set Nikola site."""
  69         # Redirect automatically generated 'index_rss' path handler to 'rss' for compatibility with old rss plugin
  70         site.register_path_handler('rss', lambda name, lang: site.path_handlers['index_rss'](name, lang))
  71         site.path_handlers['rss'].__doc__ = """A link to the RSS feed path.
  72 
  73 Example:
  74 
  75     link://rss => /blog/rss.xml
  76         """.strip()
  77         return super(Indexes, self).set_site(site)
  78 
  79     def get_implicit_classifications(self, lang):
  80         """Return a list of classification strings which should always appear in posts_per_classification."""
  81         return [""]
  82 
  83     def classify(self, post, lang):
  84         """Classify the given post for the given language."""
  85         return [""]
  86 
  87     def get_classification_friendly_name(self, classification, lang, only_last_component=False):
  88         """Extract a friendly name from the classification."""
  89         return self.site.config["BLOG_TITLE"](lang)
  90 
  91     def get_path(self, classification, lang, dest_type='page'):
  92         """Return a path for the given classification."""
  93         if dest_type == 'rss':
  94             return [self.site.config['RSS_PATH'](lang)], True
  95         # 'page' (index) or 'feed' (Atom)
  96         page_number = None
  97         if dest_type == 'page':
  98             # Interpret argument as page number
  99             try:
  100                 page_number = int(classification)
  101             except (ValueError, TypeError):
  102                 pass
  103         return [self.site.config['INDEX_PATH'](lang)], 'always', page_number
  104 
  105     def provide_context_and_uptodate(self, classification, lang, node=None):
  106         """Provide data for the context and the uptodate list for the list of the given classifiation."""
  107         kw = {
  108         }
  109         context = {
  110             "title": self.site.config["INDEXES_TITLE"](lang) or self.site.config["BLOG_TITLE"](lang),
  111             "description": self.site.config["BLOG_DESCRIPTION"](lang),
  112             "pagekind": ["main_index", "index"],
  113         }
  114         kw.update(context)
  115         return context, kw
  116 
  117     def should_generate_classification_page(self, classification, post_list, lang):
  118         """Only generates list of posts for classification if this function returns True."""
  119         return not self.site.config["DISABLE_INDEXES_PLUGIN_INDEX_AND_ATOM_FEED"]
  120 
  121     def should_generate_rss_for_classification_page(self, classification, post_list, lang):
  122         """Only generates RSS feed for list of posts for classification if this function returns True."""
  123         return not self.site.config["DISABLE_INDEXES_PLUGIN_RSS_FEED"]
  124
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/nikola/plugins/task/indexes.py b/nikola/plugins/task/indexes.py
  --- a/nikola/plugins/task/indexes.py
  +++ b/nikola/plugins/task/indexes.py
  @@ -91,7 +91,7 @@
       def get_path(self, classification, lang, dest_type='page'):
           """Return a path for the given classification."""
           if dest_type == 'rss':
  -            return [self.site.config['RSS_PATH'](lang)], True
  +            return [self.site.config['RSS_PATH'](lang), 'rss'], 'auto'
           # 'page' (index) or 'feed' (Atom)
           page_number = None
           if dest_type == 'page':
  
verification_info: {"golden_diff": "diff --git a/nikola/plugins/task/indexes.py b/nikola/plugins/task/indexes.py\n--- a/nikola/plugins/task/indexes.py\n+++ b/nikola/plugins/task/indexes.py\n@@ -91,7 +91,7 @@\n     def get_path(self, classification, lang, dest_type='page'):\n         \"\"\"Return a path for the given classification.\"\"\"\n         if dest_type == 'rss':\n-            return [self.site.config['RSS_PATH'](lang)], True\n+            return [self.site.config['RSS_PATH'](lang), 'rss'], 'auto'\n         # 'page' (index) or 'feed' (Atom)\n         page_number = None\n         if dest_type == 'page':\n", "issue": "RSS_PATH doesn't work as advertised (is path and filename, excluding .xml)\n* Python Version: 3.5.3\r\n* Nikola Version: v7.8.14\r\n* Operating System: Debian\r\n\r\nA fresh config says:\r\n\r\n```\r\n# Final location for the blog main RSS feed is:\r\n# output / TRANSLATION[lang] / RSS_PATH / rss.xml\r\n```\r\n\r\nwhich is in line with other `_PATH` variables.\r\n\r\nBut it seems `RSS_PATH` is actually path+filename (and `.xml` is appended).\r\n\r\nWith `RSS_PATH = \"blog/`I get `render_taxonomies:output/blog/.xml` (instead of `blog/rss.xml`)\r\n\r\nWith `RSS_PATH = blog/index.xml` I get `render_taxonomies:output/blog/index.xml.xml`\r\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\n# Copyright \u00a9 2012-2018 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including without limitation\n# the rights to use, copy, modify, merge, publish,\n# distribute, sublicense, and/or sell copies of the\n# Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice\n# shall be included in all copies or substantial portions of\n# the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY\n# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE\n# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR\n# PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS\n# OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\"\"\"Render the blog's main index.\"\"\"\n\n\nfrom nikola.plugin_categories import Taxonomy\n\n\nclass Indexes(Taxonomy):\n    \"\"\"Classify for the blog's main index.\"\"\"\n\n    name = \"classify_indexes\"\n\n    classification_name = \"index\"\n    overview_page_variable_name = None\n    more_than_one_classifications_per_post = False\n    has_hierarchy = False\n    show_list_as_index = True\n    template_for_single_list = \"index.tmpl\"\n    template_for_classification_overview = None\n    apply_to_posts = True\n    apply_to_pages = False\n    omit_empty_classifications = False\n    path_handler_docstrings = {\n        'index_index': False,\n        'index': \"\"\"Link to a numbered index.\n\nExample:\n\nlink://index/3 => /index-3.html\"\"\",\n        'index_atom': \"\"\"Link to a numbered Atom index.\n\nExample:\n\nlink://index_atom/3 => /index-3.atom\"\"\",\n        'index_rss': \"\"\"A link to the RSS feed path.\n\nExample:\n\nlink://rss => /blog/rss.xml\"\"\",\n    }\n\n    def set_site(self, site):\n        \"\"\"Set Nikola site.\"\"\"\n        # Redirect automatically generated 'index_rss' path handler to 'rss' for compatibility with old rss plugin\n        site.register_path_handler('rss', lambda name, lang: site.path_handlers['index_rss'](name, lang))\n        site.path_handlers['rss'].__doc__ = \"\"\"A link to the RSS feed path.\n\nExample:\n\n    link://rss => /blog/rss.xml\n        \"\"\".strip()\n        return super(Indexes, self).set_site(site)\n\n    def get_implicit_classifications(self, lang):\n        \"\"\"Return a list of classification strings which should always appear in posts_per_classification.\"\"\"\n        return [\"\"]\n\n    def classify(self, post, lang):\n        \"\"\"Classify the given post for the given language.\"\"\"\n        return [\"\"]\n\n    def get_classification_friendly_name(self, classification, lang, only_last_component=False):\n        \"\"\"Extract a friendly name from the classification.\"\"\"\n        return self.site.config[\"BLOG_TITLE\"](lang)\n\n    def get_path(self, classification, lang, dest_type='page'):\n        \"\"\"Return a path for the given classification.\"\"\"\n        if dest_type == 'rss':\n            return [self.site.config['RSS_PATH'](lang)], True\n        # 'page' (index) or 'feed' (Atom)\n        page_number = None\n        if dest_type == 'page':\n            # Interpret argument as page number\n            try:\n                page_number = int(classification)\n            except (ValueError, TypeError):\n                pass\n        return [self.site.config['INDEX_PATH'](lang)], 'always', page_number\n\n    def provide_context_and_uptodate(self, classification, lang, node=None):\n        \"\"\"Provide data for the context and the uptodate list for the list of the given classifiation.\"\"\"\n        kw = {\n        }\n        context = {\n            \"title\": self.site.config[\"INDEXES_TITLE\"](lang) or self.site.config[\"BLOG_TITLE\"](lang),\n            \"description\": self.site.config[\"BLOG_DESCRIPTION\"](lang),\n            \"pagekind\": [\"main_index\", \"index\"],\n        }\n        kw.update(context)\n        return context, kw\n\n    def should_generate_classification_page(self, classification, post_list, lang):\n        \"\"\"Only generates list of posts for classification if this function returns True.\"\"\"\n        return not self.site.config[\"DISABLE_INDEXES_PLUGIN_INDEX_AND_ATOM_FEED\"]\n\n    def should_generate_rss_for_classification_page(self, classification, post_list, lang):\n        \"\"\"Only generates RSS feed for list of posts for classification if this function returns True.\"\"\"\n        return not self.site.config[\"DISABLE_INDEXES_PLUGIN_RSS_FEED\"]\n", "path": "nikola/plugins/task/indexes.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n\n# Copyright \u00a9 2012-2018 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including without limitation\n# the rights to use, copy, modify, merge, publish,\n# distribute, sublicense, and/or sell copies of the\n# Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice\n# shall be included in all copies or substantial portions of\n# the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY\n# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE\n# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR\n# PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS\n# OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\"\"\"Render the blog's main index.\"\"\"\n\n\nfrom nikola.plugin_categories import Taxonomy\n\n\nclass Indexes(Taxonomy):\n    \"\"\"Classify for the blog's main index.\"\"\"\n\n    name = \"classify_indexes\"\n\n    classification_name = \"index\"\n    overview_page_variable_name = None\n    more_than_one_classifications_per_post = False\n    has_hierarchy = False\n    show_list_as_index = True\n    template_for_single_list = \"index.tmpl\"\n    template_for_classification_overview = None\n    apply_to_posts = True\n    apply_to_pages = False\n    omit_empty_classifications = False\n    path_handler_docstrings = {\n        'index_index': False,\n        'index': \"\"\"Link to a numbered index.\n\nExample:\n\nlink://index/3 => /index-3.html\"\"\",\n        'index_atom': \"\"\"Link to a numbered Atom index.\n\nExample:\n\nlink://index_atom/3 => /index-3.atom\"\"\",\n        'index_rss': \"\"\"A link to the RSS feed path.\n\nExample:\n\nlink://rss => /blog/rss.xml\"\"\",\n    }\n\n    def set_site(self, site):\n        \"\"\"Set Nikola site.\"\"\"\n        # Redirect automatically generated 'index_rss' path handler to 'rss' for compatibility with old rss plugin\n        site.register_path_handler('rss', lambda name, lang: site.path_handlers['index_rss'](name, lang))\n        site.path_handlers['rss'].__doc__ = \"\"\"A link to the RSS feed path.\n\nExample:\n\n    link://rss => /blog/rss.xml\n        \"\"\".strip()\n        return super(Indexes, self).set_site(site)\n\n    def get_implicit_classifications(self, lang):\n        \"\"\"Return a list of classification strings which should always appear in posts_per_classification.\"\"\"\n        return [\"\"]\n\n    def classify(self, post, lang):\n        \"\"\"Classify the given post for the given language.\"\"\"\n        return [\"\"]\n\n    def get_classification_friendly_name(self, classification, lang, only_last_component=False):\n        \"\"\"Extract a friendly name from the classification.\"\"\"\n        return self.site.config[\"BLOG_TITLE\"](lang)\n\n    def get_path(self, classification, lang, dest_type='page'):\n        \"\"\"Return a path for the given classification.\"\"\"\n        if dest_type == 'rss':\n            return [self.site.config['RSS_PATH'](lang), 'rss'], 'auto'\n        # 'page' (index) or 'feed' (Atom)\n        page_number = None\n        if dest_type == 'page':\n            # Interpret argument as page number\n            try:\n                page_number = int(classification)\n            except (ValueError, TypeError):\n                pass\n        return [self.site.config['INDEX_PATH'](lang)], 'always', page_number\n\n    def provide_context_and_uptodate(self, classification, lang, node=None):\n        \"\"\"Provide data for the context and the uptodate list for the list of the given classifiation.\"\"\"\n        kw = {\n        }\n        context = {\n            \"title\": self.site.config[\"INDEXES_TITLE\"](lang) or self.site.config[\"BLOG_TITLE\"](lang),\n            \"description\": self.site.config[\"BLOG_DESCRIPTION\"](lang),\n            \"pagekind\": [\"main_index\", \"index\"],\n        }\n        kw.update(context)\n        return context, kw\n\n    def should_generate_classification_page(self, classification, post_list, lang):\n        \"\"\"Only generates list of posts for classification if this function returns True.\"\"\"\n        return not self.site.config[\"DISABLE_INDEXES_PLUGIN_INDEX_AND_ATOM_FEED\"]\n\n    def should_generate_rss_for_classification_page(self, classification, post_list, lang):\n        \"\"\"Only generates RSS feed for list of posts for classification if this function returns True.\"\"\"\n        return not self.site.config[\"DISABLE_INDEXES_PLUGIN_RSS_FEED\"]\n", "path": "nikola/plugins/task/indexes.py"}]}