You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by ha...@apache.org on 2021/12/16 07:18:45 UTC
[incubator-hop] branch master updated: HOP-3544 : Unable to edit json files in file explorer
This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hop.git
The following commit(s) were added to refs/heads/master by this push:
new 39df2b3 HOP-3544 : Unable to edit json files in file explorer
new 29c3d9d Merge pull request #1222 from uraychang/saveFileNotFound
39df2b3 is described below
commit 39df2b3ab9325660b98e184fe0fbf5b6183f713f
Author: ray.chang <ur...@gmail.com>
AuthorDate: Wed Dec 15 14:59:58 2021 +0800
HOP-3544 : Unable to edit json files in file explorer
---
.../hop/pipeline/transforms/types/JsonExplorerFileTypeHandler.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/plugins/transforms/json/src/main/java/org/apache/hop/pipeline/transforms/types/JsonExplorerFileTypeHandler.java b/plugins/transforms/json/src/main/java/org/apache/hop/pipeline/transforms/types/JsonExplorerFileTypeHandler.java
index 36883de..ca4c1ab 100644
--- a/plugins/transforms/json/src/main/java/org/apache/hop/pipeline/transforms/types/JsonExplorerFileTypeHandler.java
+++ b/plugins/transforms/json/src/main/java/org/apache/hop/pipeline/transforms/types/JsonExplorerFileTypeHandler.java
@@ -22,6 +22,7 @@ import org.apache.hop.core.Const;
import org.apache.hop.core.Props;
import org.apache.hop.core.exception.HopException;
import org.apache.hop.core.logging.LogChannel;
+import org.apache.hop.core.vfs.HopVfs;
import org.apache.hop.ui.core.PropsUi;
import org.apache.hop.ui.hopgui.HopGui;
import org.apache.hop.ui.hopgui.perspective.explorer.ExplorerFile;
@@ -96,7 +97,7 @@ public class JsonExplorerFileTypeHandler extends BaseExplorerFileTypeHandler
// Save the file...
//
- try (OutputStream outputStream = new FileOutputStream(filename)) {
+ try (OutputStream outputStream = HopVfs.getOutputStream(filename,false)) {
outputStream.write(wText.getText().getBytes(StandardCharsets.UTF_8));
outputStream.flush();
}