mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-04-21 06:58:55 -04:00
Rework temp name for PTB
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user