mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-22 07:30:24 +00:00
Fix powershell temp dir stack overflow
This commit is contained in:
parent
d482c23cf6
commit
e91b6da9dd
1 changed files with 4 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue