Fix powershell temp dir stack overflow

This commit is contained in:
crschnick 2023-04-07 02:16:47 +00:00
parent d482c23cf6
commit e91b6da9dd

View file

@ -23,14 +23,12 @@ public class XPipeTempDirectory {
var base = proc.getOsType().getTempDirectory(proc);
var dir = FileNames.join(base, "xpipe");
if (!proc.getShellDialect().createFileExistsCommand(proc, dir).executeAndCheck()) {
proc.executeSimpleCommand(proc.getShellDialect().getMkdirsCommand(dir),
"Unable to access or create temporary directory " + dir);
if (proc.getOsType().equals(OsType.LINUX) || proc.getOsType().equals(OsType.MACOS)) {
proc.executeSimpleCommand("chmod -f 777 \"" + dir + "\"");
}
}
return dir;
}