Skip to content

Commit

Permalink
DownloadFile: fix FileNotFoundExeception when download file in a folder
Browse files Browse the repository at this point in the history
  • Loading branch information
anh-bolt committed Sep 12, 2024
1 parent f8f22df commit 7ec17b4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sftp-connector/processes/Sftp/SftpDownloadFile.p.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@
" ivy.log.debug(\"The following file: {0} will be downloaded from the server. Size: {1} bytes\", in.remoteFileName, fileData.size);",
" ",
" in.toFile = new File(in.remoteFileName, true);",
"",
" if(!in.toFile.getParentFile().exists()) {",
" in.toFile.getParentFile().mkdir();",
" }",
" ",
" FileOutputStream fos = null;",
" try {",
" fos = new FileOutputStream(in.toFile.getJavaFile());",
Expand Down

0 comments on commit 7ec17b4

Please sign in to comment.