Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo-1
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
solo-1
Commits
895522aa
Commit
895522aa
authored
Jul 03, 2017
by
Liang Ding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
📈
#12293 导入 MD 日志输出
parent
923b1f6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
src/main/java/org/b3log/solo/service/ImportService.java
src/main/java/org/b3log/solo/service/ImportService.java
+9
-1
No files found.
src/main/java/org/b3log/solo/service/ImportService.java
View file @
895522aa
...
@@ -37,7 +37,7 @@ import java.util.*;
...
@@ -37,7 +37,7 @@ import java.util.*;
* Import service.
* Import service.
*
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.0.
1, Jun 26
, 2017
* @version 1.0.0.
2, Jul 3
, 2017
* @since 2.2.0
* @since 2.2.0
*/
*/
@Service
@Service
...
@@ -91,6 +91,10 @@ public class ImportService {
...
@@ -91,6 +91,10 @@ public class ImportService {
int
succCnt
=
0
,
failCnt
=
0
;
int
succCnt
=
0
,
failCnt
=
0
;
final
Set
<
String
>
failSet
=
new
TreeSet
<>();
final
Set
<
String
>
failSet
=
new
TreeSet
<>();
final
Collection
<
File
>
mds
=
FileUtils
.
listFiles
(
new
File
(
markdownsPath
),
new
String
[]{
"md"
},
true
);
final
Collection
<
File
>
mds
=
FileUtils
.
listFiles
(
new
File
(
markdownsPath
),
new
String
[]{
"md"
},
true
);
if
(
null
==
mds
||
mds
.
isEmpty
())
{
return
;
}
for
(
final
File
md
:
mds
)
{
for
(
final
File
md
:
mds
)
{
final
String
fileName
=
md
.
getName
();
final
String
fileName
=
md
.
getName
();
if
(
StringUtils
.
equalsIgnoreCase
(
fileName
,
"README.md"
))
{
if
(
StringUtils
.
equalsIgnoreCase
(
fileName
,
"README.md"
))
{
...
@@ -117,6 +121,10 @@ public class ImportService {
...
@@ -117,6 +121,10 @@ public class ImportService {
}
}
}
}
if
(
0
==
succCnt
&&
0
==
failCnt
)
{
return
;
}
final
StringBuilder
logBuilder
=
new
StringBuilder
();
final
StringBuilder
logBuilder
=
new
StringBuilder
();
logBuilder
.
append
(
"["
).
append
(
succCnt
).
append
(
"] imported, ["
).
append
(
failCnt
).
append
(
"] failed"
);
logBuilder
.
append
(
"["
).
append
(
succCnt
).
append
(
"] imported, ["
).
append
(
failCnt
).
append
(
"] failed"
);
if
(
failCnt
>
0
)
{
if
(
failCnt
>
0
)
{
...
...
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