diff options
| author | marios <marios8543@gmail.com> | 2022-04-18 15:57:51 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-18 15:57:51 +0300 |
| commit | fa776f0d0b7b4ca7071f0aa912be84e81caf6b61 (patch) | |
| tree | 535f6f0bb71ab97f17a0ef21eb8f0491ae4ca87d /plugin_loader/browser.py | |
| parent | 4576fed01baac066a8550018a0922739cc2f8985 (diff) | |
| download | decky-loader-fa776f0d0b7b4ca7071f0aa912be84e81caf6b61.tar.gz decky-loader-fa776f0d0b7b4ca7071f0aa912be84e81caf6b61.zip | |
Callsigns (#37)v1.2.0
* Plugin callsigns, filechangehandler thread bug fix, plugin file perms
- Plugins are now assigned a callsign (a random string), which they use for all internal identification, like resource fetching and method calls. This is to ensure that plugins only access their own resources and methods.
- Made FileChangeHandler send off events to a queue, that is then consumed by the Loader, instead of calling import_plugin on its own, since that caused weird issues with the event loop and the thread watchdog is using.
- Plugins are now owned by root and have read-only permissions. This is handled automatically.
* Improved general look and feel of plugin tab
* Make all plugin entries have the same padding between them
* Make "No plugins installed" text look the same as "No new notifications"
Co-authored-by: WerWolv <werwolv98@gmail.com>
Diffstat (limited to 'plugin_loader/browser.py')
| -rw-r--r-- | plugin_loader/browser.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugin_loader/browser.py b/plugin_loader/browser.py index 7fc8773b..ffec26b3 100644 --- a/plugin_loader/browser.py +++ b/plugin_loader/browser.py @@ -9,6 +9,7 @@ from concurrent.futures import ProcessPoolExecutor from asyncio import get_event_loop from time import time from hashlib import sha256 +from subprocess import Popen class PluginInstallContext: def __init__(self, gh_url, version, hash) -> None: @@ -35,6 +36,8 @@ class PluginBrowser: zip_file = ZipFile(zip) zip_file.extractall(self.plugin_path) rename(path.join(self.plugin_path, zip_file.namelist()[0]), path.join(self.plugin_path, name)) + Popen(["chown", "-R", "deck:deck", self.plugin_path]) + Popen(["chmod", "-R", "555", self.plugin_path]) return True async def _install(self, artifact, version, hash): |
