ssh kitten: Allow using absolute paths for the location of transferred data

Fixes #5607
This commit is contained in:
Kovid Goyal
2022-10-19 20:43:53 +05:30
parent 90e80477e9
commit 1747bbbbcb
5 changed files with 12 additions and 16 deletions
+4 -1
View File
@@ -205,7 +205,10 @@ def get_data():
with open(tdir + '/data.sh') as f:
env_vars = f.read()
apply_env_vars(env_vars)
data_dir = os.path.join(HOME, os.environ.pop('KITTY_SSH_KITTEN_DATA_DIR'))
data_dir = os.environ.pop('KITTY_SSH_KITTEN_DATA_DIR')
if not os.path.isabs(data_dir):
data_dir = os.path.join(HOME, data_dir)
data_dir = os.path.abspath(data_dir)
shell_integration_dir = os.path.join(data_dir, 'shell-integration')
compile_terminfo(tdir + '/home')
move(tdir + '/home', HOME)