Rework temp name for PTB

This commit is contained in:
crschnick
2026-04-10 12:14:15 +00:00
parent 65f2faac2c
commit 87ee5ff54d

View File

@@ -16,7 +16,8 @@ public class ShellTemp {
// Even on macOS as root it is technically unique as only root will use /tmp
if (proc.getOsType() != OsType.WINDOWS && proc.getOsType() != OsType.MACOS) {
var temp = proc.getSystemTemporaryDirectory();
base = temp.join(AppNames.ofCurrent().getKebapName());
// Prevent interference with xpipe-* temp files
base = temp.join(AppNames.ofCurrent().getKebapName().replace("-", "_"));
proc.view().mkdir(base);
// We have to make sure that also other users can create files here
// This command should work in all shells
@@ -30,7 +31,8 @@ public class ShellTemp {
.executeAndCheck();
} else {
var temp = proc.getSystemTemporaryDirectory();
base = temp.join(AppNames.ofCurrent().getKebapName());
// Prevent interference with xpipe-* temp files
base = temp.join(AppNames.ofCurrent().getKebapName().replace("-", "_"));
}
return sub != null ? base.join(sub) : base;
}