We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Tails 3.0 does not restore the original filename when uncompressing a file
# Bug

Tails 3.0 does not preserve the filename when extracting an archive.

## Description

When extracting an archive, Tails 3.0 will rename the file inside the archive to _data_.

## Steps to Reproduce

Download a SecureDrop submission, decrypt the submission and extract the archive.

## Expected Behavior

Tails should preserve the filename and leave you with, say, _code_name.pdf_.

## Actual Behavior

Tails 3.0 leaves you with a file called _data_ instead.

## Comments

I suspect this is an issue with Tails 3.0 and not the way SecureDrop creates the archive in the first place. Filing here just in case.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `install_files/ansible-base/roles/tails-config/files/securedrop_init.py`
Content:
```
1 #!/usr/bin/python
2 
3 import os
4 import sys
5 import subprocess
6 
7 
8 # check for root
9 if os.geteuid() != 0:
10     sys.exit('You need to run this as root')
11 
12 # paths
13 path_torrc_additions = '/home/amnesia/Persistent/.securedrop/torrc_additions'
14 path_torrc_backup = '/etc/tor/torrc.bak'
15 path_torrc = '/etc/tor/torrc'
16 
17 # load torrc_additions
18 if os.path.isfile(path_torrc_additions):
19     torrc_additions = open(path_torrc_additions).read()
20 else:
21     sys.exit('Error opening {0} for reading'.format(path_torrc_additions))
22 
23 # load torrc
24 if os.path.isfile(path_torrc_backup):
25     torrc = open(path_torrc_backup).read()
26 else:
27     if os.path.isfile(path_torrc):
28         torrc = open(path_torrc).read()
29     else:
30         sys.exit('Error opening {0} for reading'.format(path_torrc))
31 
32     # save a backup
33     open(path_torrc_backup, 'w').write(torrc)
34 
35 # append the additions
36 open(path_torrc, 'w').write(torrc + torrc_additions)
37 
38 # reload tor
39 try:
40     subprocess.check_call(['systemctl', 'reload', 'tor@default.service'])
41 except subprocess.CalledProcessError:
42     sys.exit('Error reloading Tor')
43 
44 # notify the user
45 subprocess.call(['tails-notify-user',
46                  'SecureDrop successfully auto-configured!',
47                  'You can now access the Journalist Interface.\nIf you are an admin, you can now SSH to the servers.'])
48
```
--- 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/install_files/ansible-base/roles/tails-config/files/securedrop_init.py b/install_files/ansible-base/roles/tails-config/files/securedrop_init.py
--- a/install_files/ansible-base/roles/tails-config/files/securedrop_init.py
+++ b/install_files/ansible-base/roles/tails-config/files/securedrop_init.py
@@ -41,6 +41,13 @@
 except subprocess.CalledProcessError:
     sys.exit('Error reloading Tor')
 
+# Turn off "automatic-decompression" in Nautilus to ensure the original
+# submission filename is restored (see
+# https://github.com/freedomofpress/securedrop/issues/1862#issuecomment-311519750).
+subprocess.call(['/usr/bin/dconf', 'write',
+                 '/org/gnome/nautilus/preferences/automatic-decompression',
+                 'false'])
+
 # notify the user
 subprocess.call(['tails-notify-user',
                  'SecureDrop successfully auto-configured!',

{"golden_diff": "diff --git a/install_files/ansible-base/roles/tails-config/files/securedrop_init.py b/install_files/ansible-base/roles/tails-config/files/securedrop_init.py\n--- a/install_files/ansible-base/roles/tails-config/files/securedrop_init.py\n+++ b/install_files/ansible-base/roles/tails-config/files/securedrop_init.py\n@@ -41,6 +41,13 @@\n except subprocess.CalledProcessError:\n     sys.exit('Error reloading Tor')\n \n+# Turn off \"automatic-decompression\" in Nautilus to ensure the original\n+# submission filename is restored (see\n+# https://github.com/freedomofpress/securedrop/issues/1862#issuecomment-311519750).\n+subprocess.call(['/usr/bin/dconf', 'write',\n+                 '/org/gnome/nautilus/preferences/automatic-decompression',\n+                 'false'])\n+\n # notify the user\n subprocess.call(['tails-notify-user',\n                  'SecureDrop successfully auto-configured!',\n", "issue": "Tails 3.0 does not restore the original filename when uncompressing a file\n# Bug\r\n\r\nTails 3.0 does not preserve the filename when extracting an archive.\r\n\r\n## Description\r\n\r\nWhen extracting an archive, Tails 3.0 will rename the file inside the archive to _data_.\r\n\r\n## Steps to Reproduce\r\n\r\nDownload a SecureDrop submission, decrypt the submission and extract the archive.\r\n\r\n## Expected Behavior\r\n\r\nTails should preserve the filename and leave you with, say, _code_name.pdf_.\r\n\r\n## Actual Behavior\r\n\r\nTails 3.0 leaves you with a file called _data_ instead.\r\n\r\n## Comments\r\n\r\nI suspect this is an issue with Tails 3.0 and not the way SecureDrop creates the archive in the first place. Filing here just in case.\n", "before_files": [{"content": "#!/usr/bin/python\n\nimport os\nimport sys\nimport subprocess\n\n\n# check for root\nif os.geteuid() != 0:\n    sys.exit('You need to run this as root')\n\n# paths\npath_torrc_additions = '/home/amnesia/Persistent/.securedrop/torrc_additions'\npath_torrc_backup = '/etc/tor/torrc.bak'\npath_torrc = '/etc/tor/torrc'\n\n# load torrc_additions\nif os.path.isfile(path_torrc_additions):\n    torrc_additions = open(path_torrc_additions).read()\nelse:\n    sys.exit('Error opening {0} for reading'.format(path_torrc_additions))\n\n# load torrc\nif os.path.isfile(path_torrc_backup):\n    torrc = open(path_torrc_backup).read()\nelse:\n    if os.path.isfile(path_torrc):\n        torrc = open(path_torrc).read()\n    else:\n        sys.exit('Error opening {0} for reading'.format(path_torrc))\n\n    # save a backup\n    open(path_torrc_backup, 'w').write(torrc)\n\n# append the additions\nopen(path_torrc, 'w').write(torrc + torrc_additions)\n\n# reload tor\ntry:\n    subprocess.check_call(['systemctl', 'reload', 'tor@default.service'])\nexcept subprocess.CalledProcessError:\n    sys.exit('Error reloading Tor')\n\n# notify the user\nsubprocess.call(['tails-notify-user',\n                 'SecureDrop successfully auto-configured!',\n                 'You can now access the Journalist Interface.\\nIf you are an admin, you can now SSH to the servers.'])\n", "path": "install_files/ansible-base/roles/tails-config/files/securedrop_init.py"}], "after_files": [{"content": "#!/usr/bin/python\n\nimport os\nimport sys\nimport subprocess\n\n\n# check for root\nif os.geteuid() != 0:\n    sys.exit('You need to run this as root')\n\n# paths\npath_torrc_additions = '/home/amnesia/Persistent/.securedrop/torrc_additions'\npath_torrc_backup = '/etc/tor/torrc.bak'\npath_torrc = '/etc/tor/torrc'\n\n# load torrc_additions\nif os.path.isfile(path_torrc_additions):\n    torrc_additions = open(path_torrc_additions).read()\nelse:\n    sys.exit('Error opening {0} for reading'.format(path_torrc_additions))\n\n# load torrc\nif os.path.isfile(path_torrc_backup):\n    torrc = open(path_torrc_backup).read()\nelse:\n    if os.path.isfile(path_torrc):\n        torrc = open(path_torrc).read()\n    else:\n        sys.exit('Error opening {0} for reading'.format(path_torrc))\n\n    # save a backup\n    open(path_torrc_backup, 'w').write(torrc)\n\n# append the additions\nopen(path_torrc, 'w').write(torrc + torrc_additions)\n\n# reload tor\ntry:\n    subprocess.check_call(['systemctl', 'reload', 'tor@default.service'])\nexcept subprocess.CalledProcessError:\n    sys.exit('Error reloading Tor')\n\n# Turn off \"automatic-decompression\" in Nautilus to ensure the original\n# submission filename is restored (see\n# https://github.com/freedomofpress/securedrop/issues/1862#issuecomment-311519750).\nsubprocess.call(['/usr/bin/dconf', 'write',\n                 '/org/gnome/nautilus/preferences/automatic-decompression',\n                 'false'])\n\n# notify the user\nsubprocess.call(['tails-notify-user',\n                 'SecureDrop successfully auto-configured!',\n                 'You can now access the Journalist Interface.\\nIf you are an admin, you can now SSH to the servers.'])\n", "path": "install_files/ansible-base/roles/tails-config/files/securedrop_init.py"}]}