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
+3
View File
@@ -41,6 +41,9 @@ class PluginManager:
self._engines.clear() self._engines.clear()
plugins_path = Path(plugins_dir) plugins_path = Path(plugins_dir)
if not plugins_path.exists():
if plugins_dir == "plugins":
plugins_path = Path(__file__).resolve().parent.parent.parent / "plugins"
if not plugins_path.exists(): if not plugins_path.exists():
self._loaded = True self._loaded = True
return return