Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
谢明辉
/
vion-label
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3ed5f823
authored
Feb 05, 2024
by
姚冰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
sendDataFromFile接口过滤解压后空文件夹,提取其它类型错误
1 parent
abf6a3c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
label-tool-keliu/src/main/java/com/viontech/label/tool/keliu/service/LocalFileServiceImpl.java
label-tool-keliu/src/main/java/com/viontech/label/tool/keliu/service/LocalFileServiceImpl.java
View file @
3ed5f82
...
@@ -102,6 +102,10 @@ public class LocalFileServiceImpl implements FileService {
...
@@ -102,6 +102,10 @@ public class LocalFileServiceImpl implements FileService {
log
.
info
(
"解压文件成功:{}"
,
path
);
log
.
info
(
"解压文件成功:{}"
,
path
);
List
<
String
>
paths
=
readFileDirectory
(
path
,
targetFile
);
List
<
String
>
paths
=
readFileDirectory
(
path
,
targetFile
);
if
(
paths
==
null
||
paths
.
size
()
==
0
)
{
removeFiles
(
path
);
continue
;
}
paths
.
forEach
(
filepath
->
{
paths
.
forEach
(
filepath
->
{
List
<
BodyRecognition
>
list
=
getFileBodyRecognition
(
filepath
,
f
.
getName
(),
direction
);
List
<
BodyRecognition
>
list
=
getFileBodyRecognition
(
filepath
,
f
.
getName
(),
direction
);
...
@@ -332,7 +336,7 @@ public class LocalFileServiceImpl implements FileService {
...
@@ -332,7 +336,7 @@ public class LocalFileServiceImpl implements FileService {
private
boolean
unzipFile
(
String
filename
,
String
path
)
{
private
boolean
unzipFile
(
String
filename
,
String
path
)
{
String
cmd
=
"tar xvf "
+
filename
+
" -C "
+
path
;
String
cmd
=
"tar xvf "
+
filename
+
" -C "
+
path
;
String
result
=
callShellByExec
(
cmd
);
String
result
=
callShellByExec
(
cmd
);
if
(
result
.
contains
(
"tar:"
)
||
result
.
contains
(
"E
rror"
))
{
if
(
result
.
contains
(
"tar:"
)
||
result
.
toLowerCase
().
contains
(
"e
rror"
))
{
return
false
;
return
false
;
}
}
return
true
;
return
true
;
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment