Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
be-esb-plugin
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
be-esb-ecosystem-maven
be-esb-plugin
Commits
6d1f1f28
Commit
6d1f1f28
authored
Oct 18, 2022
by
s_guodong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改sftpConnection2的bug
parent
75256457
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
+8
-1
SftpConnection2.java
...ance/eibs/core/service/instance/impl/SftpConnection2.java
+8
-1
No files found.
be-esb-plugin-third/src/main/java/com/brilliance/eibs/core/service/instance/impl/SftpConnection2.java
View file @
6d1f1f28
...
...
@@ -173,6 +173,9 @@ public class SftpConnection2 extends AbsConnection {
String
filename
=
null
;
String
localFilePath
=
null
;
try
{
if
(!
new
File
(
localPath
).
exists
())
{
new
File
(
localPath
).
mkdirs
();
}
Matcher
matcher
=
null
;
Vector
<
LsEntry
>
vector
=
sftp
.
ls
(
remotePath
);
if
(
vector
.
size
()
==
1
)
{
...
...
@@ -181,13 +184,17 @@ public class SftpConnection2 extends AbsConnection {
sftp
.
cd
(
remotePath
);
for
(
LsEntry
entry
:
vector
)
{
filename
=
entry
.
getFilename
();
if
(
entry
.
getLongname
().
startsWith
(
"d"
))
{
continue
;
}
if
(
StringUtil
.
isEmpty
(
filenameRegex
))
{
localFilePath
=
localPath
+
File
.
separator
+
filename
;
localFilePath
=
localPath
+
filename
;
File
file
=
new
File
(
localFilePath
);
if
(
file
.
exists
())
{
file
.
delete
();
}
file
.
createNewFile
();
output
=
new
FileOutputStream
(
file
);
sftp
.
get
(
filename
,
output
);
if
(
deleteFlag
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment