From 442f8f7324ccc9a5316b26c5917af5e9c3c934d2 Mon Sep 17 00:00:00 2001 From: crschnick Date: Mon, 22 May 2023 20:24:47 +0000 Subject: [PATCH] Small fixes --- app/src/main/java/io/xpipe/app/util/ScriptHelper.java | 4 ++-- core/src/main/java/io/xpipe/core/util/XPipeTempDirectory.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/util/ScriptHelper.java b/app/src/main/java/io/xpipe/app/util/ScriptHelper.java index c6ce62ec..bb6054f9 100644 --- a/app/src/main/java/io/xpipe/app/util/ScriptHelper.java +++ b/app/src/main/java/io/xpipe/app/util/ScriptHelper.java @@ -55,13 +55,13 @@ public class ScriptHelper { var applyRcCommand = t.applyRcFileCommand(); if (applyRcCommand != null) { - content = content + "\n" + applyRcCommand; + content = content + "\n" + applyRcCommand + "\n"; } if (login) { var applyProfilesCommand = t.applyProfileFilesCommand(); if (applyProfilesCommand != null) { - content = content + "\n" + applyProfilesCommand; + content = content + "\n" + applyProfilesCommand + "\n"; } } diff --git a/core/src/main/java/io/xpipe/core/util/XPipeTempDirectory.java b/core/src/main/java/io/xpipe/core/util/XPipeTempDirectory.java index b9e186d3..976d6d3e 100644 --- a/core/src/main/java/io/xpipe/core/util/XPipeTempDirectory.java +++ b/core/src/main/java/io/xpipe/core/util/XPipeTempDirectory.java @@ -19,7 +19,8 @@ public class XPipeTempDirectory { var arr = Stream.concat(Stream.of(base, "xpipe"), Arrays.stream(sub)).toArray(String[]::new); var dir = FileNames.join(arr); - if (!proc.getShellDialect().createFileExistsCommand(proc, dir).executeAndCheck()) { + var existsCommand = proc.getShellDialect().createFileExistsCommand(proc, dir); + if (!existsCommand.executeAndCheck()) { proc.executeSimpleCommand( proc.getShellDialect().getMkdirsCommand(dir), "Unable to access or create temporary directory " + dir);