We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
output/assets/css/code.css is orphaned?
```
~/blog$ nikola build
Scanning posts................done!
copy_assets:output/assets/css/base.css
Scanning posts................done!
~/blog$ 
~/blog$ nikola build
Scanning posts................done!
~/blog$ nikola check -f
Scanning posts................done!
WARNING: check: Files from unknown origins (orphans):
WARNING: check: output/assets/css/code.css
~/blog$ nikola build
Scanning posts................done!
copy_assets:output/assets/css/base.css
~/blog$ nikola check -f
Scanning posts................done!
WARNING: check: Files from unknown origins (orphans):
WARNING: check: output/assets/css/code.css
```


--- 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/copy_assets.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 
3 # Copyright © 2012-2015 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 """Copy theme assets into output."""
28 
29 from __future__ import unicode_literals
30 
31 import io
32 import os
33 
34 from nikola.plugin_categories import Task
35 from nikola import utils
36 
37 
38 class CopyAssets(Task):
39 
40     """Copy theme assets into output."""
41 
42     name = "copy_assets"
43 
44     def gen_tasks(self):
45         """Create tasks to copy the assets of the whole theme chain.
46 
47         If a file is present on two themes, use the version
48         from the "youngest" theme.
49         """
50         kw = {
51             "themes": self.site.THEMES,
52             "files_folders": self.site.config['FILES_FOLDERS'],
53             "output_folder": self.site.config['OUTPUT_FOLDER'],
54             "filters": self.site.config['FILTERS'],
55             "code_color_scheme": self.site.config['CODE_COLOR_SCHEME'],
56             "code.css_selectors": 'pre.code',
57             "code.css_head": '/* code.css file generated by Nikola */\n',
58             "code.css_close": "\ntable.codetable { width: 100%;} td.linenos {text-align: right; width: 4em;}\n",
59         }
60         tasks = {}
61         code_css_path = os.path.join(kw['output_folder'], 'assets', 'css', 'code.css')
62         code_css_input = utils.get_asset_path('assets/css/code.css',
63                                               themes=kw['themes'],
64                                               files_folders=kw['files_folders'])
65 
66         kw["code.css_input"] = code_css_input
67 
68         yield self.group_task()
69 
70         for theme_name in kw['themes']:
71             src = os.path.join(utils.get_theme_path(theme_name), 'assets')
72             dst = os.path.join(kw['output_folder'], 'assets')
73             for task in utils.copy_tree(src, dst):
74                 if task['name'] in tasks:
75                     continue
76                 tasks[task['name']] = task
77                 task['uptodate'] = [utils.config_changed(kw, 'nikola.plugins.task.copy_assets')]
78                 task['basename'] = self.name
79                 if code_css_input:
80                     if 'file_dep' not in task:
81                         task['file_dep'] = []
82                     task['file_dep'].append(code_css_input)
83                 yield utils.apply_filters(task, kw['filters'])
84 
85         # Check whether or not there is a code.css file around.
86         if not code_css_input:
87             def create_code_css():
88                 from pygments.formatters import get_formatter_by_name
89                 formatter = get_formatter_by_name('html', style=kw["code_color_scheme"])
90                 utils.makedirs(os.path.dirname(code_css_path))
91                 with io.open(code_css_path, 'w+', encoding='utf8') as outf:
92                     outf.write(kw["code.css_head"])
93                     outf.write(formatter.get_style_defs(kw["code.css_selectors"]))
94                     outf.write(kw["code.css_close"])
95 
96             if os.path.exists(code_css_path):
97                 with io.open(code_css_path, 'r', encoding='utf-8') as fh:
98                     testcontents = fh.read(len(kw["code.css_head"])) == kw["code.css_head"]
99             else:
100                 testcontents = False
101 
102             task = {
103                 'basename': self.name,
104                 'name': code_css_path,
105                 'targets': [code_css_path],
106                 'uptodate': [utils.config_changed(kw, 'nikola.plugins.task.copy_assets'), testcontents],
107                 'actions': [(create_code_css, [])],
108                 'clean': True,
109             }
110             yield utils.apply_filters(task, kw['filters'])
111
```
--- 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()

```

diff --git a/nikola/plugins/task/copy_assets.py b/nikola/plugins/task/copy_assets.py
--- a/nikola/plugins/task/copy_assets.py
+++ b/nikola/plugins/task/copy_assets.py
@@ -61,10 +61,7 @@
         code_css_path = os.path.join(kw['output_folder'], 'assets', 'css', 'code.css')
         code_css_input = utils.get_asset_path('assets/css/code.css',
                                               themes=kw['themes'],
-                                              files_folders=kw['files_folders'])
-
-        kw["code.css_input"] = code_css_input
-
+                                              files_folders=kw['files_folders'], output_dir=None)
         yield self.group_task()
 
         for theme_name in kw['themes']:

{"golden_diff": "diff --git a/nikola/plugins/task/copy_assets.py b/nikola/plugins/task/copy_assets.py\n--- a/nikola/plugins/task/copy_assets.py\n+++ b/nikola/plugins/task/copy_assets.py\n@@ -61,10 +61,7 @@\n         code_css_path = os.path.join(kw['output_folder'], 'assets', 'css', 'code.css')\n         code_css_input = utils.get_asset_path('assets/css/code.css',\n                                               themes=kw['themes'],\n-                                              files_folders=kw['files_folders'])\n-\n-        kw[\"code.css_input\"] = code_css_input\n-\n+                                              files_folders=kw['files_folders'], output_dir=None)\n         yield self.group_task()\n \n         for theme_name in kw['themes']:\n", "issue": "output/assets/css/code.css is orphaned?\n```\n~/blog$ nikola build\nScanning posts................done!\ncopy_assets:output/assets/css/base.css\nScanning posts................done!\n~/blog$ \n~/blog$ nikola build\nScanning posts................done!\n~/blog$ nikola check -f\nScanning posts................done!\nWARNING: check: Files from unknown origins (orphans):\nWARNING: check: output/assets/css/code.css\n~/blog$ nikola build\nScanning posts................done!\ncopy_assets:output/assets/css/base.css\n~/blog$ nikola check -f\nScanning posts................done!\nWARNING: check: Files from unknown origins (orphans):\nWARNING: check: output/assets/css/code.css\n```\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\n# Copyright \u00a9 2012-2015 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\"\"\"Copy theme assets into output.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport io\nimport os\n\nfrom nikola.plugin_categories import Task\nfrom nikola import utils\n\n\nclass CopyAssets(Task):\n\n    \"\"\"Copy theme assets into output.\"\"\"\n\n    name = \"copy_assets\"\n\n    def gen_tasks(self):\n        \"\"\"Create tasks to copy the assets of the whole theme chain.\n\n        If a file is present on two themes, use the version\n        from the \"youngest\" theme.\n        \"\"\"\n        kw = {\n            \"themes\": self.site.THEMES,\n            \"files_folders\": self.site.config['FILES_FOLDERS'],\n            \"output_folder\": self.site.config['OUTPUT_FOLDER'],\n            \"filters\": self.site.config['FILTERS'],\n            \"code_color_scheme\": self.site.config['CODE_COLOR_SCHEME'],\n            \"code.css_selectors\": 'pre.code',\n            \"code.css_head\": '/* code.css file generated by Nikola */\\n',\n            \"code.css_close\": \"\\ntable.codetable { width: 100%;} td.linenos {text-align: right; width: 4em;}\\n\",\n        }\n        tasks = {}\n        code_css_path = os.path.join(kw['output_folder'], 'assets', 'css', 'code.css')\n        code_css_input = utils.get_asset_path('assets/css/code.css',\n                                              themes=kw['themes'],\n                                              files_folders=kw['files_folders'])\n\n        kw[\"code.css_input\"] = code_css_input\n\n        yield self.group_task()\n\n        for theme_name in kw['themes']:\n            src = os.path.join(utils.get_theme_path(theme_name), 'assets')\n            dst = os.path.join(kw['output_folder'], 'assets')\n            for task in utils.copy_tree(src, dst):\n                if task['name'] in tasks:\n                    continue\n                tasks[task['name']] = task\n                task['uptodate'] = [utils.config_changed(kw, 'nikola.plugins.task.copy_assets')]\n                task['basename'] = self.name\n                if code_css_input:\n                    if 'file_dep' not in task:\n                        task['file_dep'] = []\n                    task['file_dep'].append(code_css_input)\n                yield utils.apply_filters(task, kw['filters'])\n\n        # Check whether or not there is a code.css file around.\n        if not code_css_input:\n            def create_code_css():\n                from pygments.formatters import get_formatter_by_name\n                formatter = get_formatter_by_name('html', style=kw[\"code_color_scheme\"])\n                utils.makedirs(os.path.dirname(code_css_path))\n                with io.open(code_css_path, 'w+', encoding='utf8') as outf:\n                    outf.write(kw[\"code.css_head\"])\n                    outf.write(formatter.get_style_defs(kw[\"code.css_selectors\"]))\n                    outf.write(kw[\"code.css_close\"])\n\n            if os.path.exists(code_css_path):\n                with io.open(code_css_path, 'r', encoding='utf-8') as fh:\n                    testcontents = fh.read(len(kw[\"code.css_head\"])) == kw[\"code.css_head\"]\n            else:\n                testcontents = False\n\n            task = {\n                'basename': self.name,\n                'name': code_css_path,\n                'targets': [code_css_path],\n                'uptodate': [utils.config_changed(kw, 'nikola.plugins.task.copy_assets'), testcontents],\n                'actions': [(create_code_css, [])],\n                'clean': True,\n            }\n            yield utils.apply_filters(task, kw['filters'])\n", "path": "nikola/plugins/task/copy_assets.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n\n# Copyright \u00a9 2012-2015 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\"\"\"Copy theme assets into output.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport io\nimport os\n\nfrom nikola.plugin_categories import Task\nfrom nikola import utils\n\n\nclass CopyAssets(Task):\n\n    \"\"\"Copy theme assets into output.\"\"\"\n\n    name = \"copy_assets\"\n\n    def gen_tasks(self):\n        \"\"\"Create tasks to copy the assets of the whole theme chain.\n\n        If a file is present on two themes, use the version\n        from the \"youngest\" theme.\n        \"\"\"\n        kw = {\n            \"themes\": self.site.THEMES,\n            \"files_folders\": self.site.config['FILES_FOLDERS'],\n            \"output_folder\": self.site.config['OUTPUT_FOLDER'],\n            \"filters\": self.site.config['FILTERS'],\n            \"code_color_scheme\": self.site.config['CODE_COLOR_SCHEME'],\n            \"code.css_selectors\": 'pre.code',\n            \"code.css_head\": '/* code.css file generated by Nikola */\\n',\n            \"code.css_close\": \"\\ntable.codetable { width: 100%;} td.linenos {text-align: right; width: 4em;}\\n\",\n        }\n        tasks = {}\n        code_css_path = os.path.join(kw['output_folder'], 'assets', 'css', 'code.css')\n        code_css_input = utils.get_asset_path('assets/css/code.css',\n                                              themes=kw['themes'],\n                                              files_folders=kw['files_folders'], output_dir=None)\n        yield self.group_task()\n\n        for theme_name in kw['themes']:\n            src = os.path.join(utils.get_theme_path(theme_name), 'assets')\n            dst = os.path.join(kw['output_folder'], 'assets')\n            for task in utils.copy_tree(src, dst):\n                if task['name'] in tasks:\n                    continue\n                tasks[task['name']] = task\n                task['uptodate'] = [utils.config_changed(kw, 'nikola.plugins.task.copy_assets')]\n                task['basename'] = self.name\n                if code_css_input:\n                    if 'file_dep' not in task:\n                        task['file_dep'] = []\n                    task['file_dep'].append(code_css_input)\n                yield utils.apply_filters(task, kw['filters'])\n\n        # Check whether or not there is a code.css file around.\n        if not code_css_input:\n            def create_code_css():\n                from pygments.formatters import get_formatter_by_name\n                formatter = get_formatter_by_name('html', style=kw[\"code_color_scheme\"])\n                utils.makedirs(os.path.dirname(code_css_path))\n                with io.open(code_css_path, 'w+', encoding='utf8') as outf:\n                    outf.write(kw[\"code.css_head\"])\n                    outf.write(formatter.get_style_defs(kw[\"code.css_selectors\"]))\n                    outf.write(kw[\"code.css_close\"])\n\n            if os.path.exists(code_css_path):\n                with io.open(code_css_path, 'r', encoding='utf-8') as fh:\n                    testcontents = fh.read(len(kw[\"code.css_head\"])) == kw[\"code.css_head\"]\n            else:\n                testcontents = False\n\n            task = {\n                'basename': self.name,\n                'name': code_css_path,\n                'targets': [code_css_path],\n                'uptodate': [utils.config_changed(kw, 'nikola.plugins.task.copy_assets'), testcontents],\n                'actions': [(create_code_css, [])],\n                'clean': True,\n            }\n            yield utils.apply_filters(task, kw['filters'])\n", "path": "nikola/plugins/task/copy_assets.py"}]}