Add user uid suffix to tmp runtime dir symlink

This commit is contained in:
pagedown 2022-03-11 15:42:52 +08:00
parent 72718cbab7
commit d3c0c422a5
No known key found for this signature in database
GPG Key ID: E921CF18AC8FF6EB

View File

@ -451,7 +451,7 @@ def connection_sharing_args(opts: SSHOptions, kitty_pid: int) -> List[str]:
# ~104 chars. macOS has no system runtime dir so we use a cache dir in
# /Users/WHY_DOES_ANYONE_USE_MACOS/Library/Caches/APPLE_ARE_IDIOTIC
if len(rd) > 35 and os.path.isdir('/tmp'):
idiotic_design = '/tmp/kssh-rdir'
idiotic_design = f'/tmp/kssh-rdir-{os.getuid()}'
try:
os.symlink(rd, idiotic_design)
except FileExistsError: