Fix empty voice list when launched via desktop shortcut

PluginManager.discover() used a relative path 'plugins', which resolved
against the CWD. When launched from a desktop shortcut the CWD is ~, so
the plugins directory was never found and no voices appeared in the list.

Fall back to the project-relative plugins path when the default relative
path doesn't resolve.
This commit is contained in:
Deniz Şafak
2026-07-23 03:55:07 +03:00
parent 342ea0dfac
commit 6274a02d5e
+5 -2
View File
@@ -42,8 +42,11 @@ class PluginManager:
plugins_path = Path(plugins_dir)
if not plugins_path.exists():
self._loaded = True
return
if plugins_dir == "plugins":
plugins_path = Path(__file__).resolve().parent.parent.parent / "plugins"
if not plugins_path.exists():
self._loaded = True
return
for entry in plugins_path.iterdir():
if entry.is_dir() and (entry / "__init__.py").exists():