diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2026-06-28 08:53:32 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2026-06-28 08:53:32 +0300 |
| commit | 8909d38747b36c2ded39e82368ef6eb7c5b9b392 (patch) | |
| tree | 52c587071f5214f96a350f5be84d92c109e27681 /faugus_run.py | |
| parent | 22d7f401898d1caf4ddba4f5ecc3e75715c8ecf4 (diff) | |
| download | fungus-launcher-game-dirs.tar.gz fungus-launcher-game-dirs.tar.xz | |
unhardcode game paths game-dirs
Diffstat (limited to 'faugus_run.py')
| -rw-r--r-- | faugus_run.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/faugus_run.py b/faugus_run.py index 7f5ee86..f3e895d 100644 --- a/faugus_run.py +++ b/faugus_run.py @@ -230,8 +230,16 @@ class FaugusRun: ] run_env = os.environ.copy() + if self.game_directories: - run_env['GAME_DIRS'] = self.game_directories + valid_dirs = [ + d.strip() for d in self.game_directories.split(",") + if os.path.isdir(d.strip()) + ] + + # join by NULL characters for sh + if valid_dirs: + run_env['GAME_DIRS'] = "\x00".join(valid_dirs) self.process = subprocess.Popen( popen_cmd, |
