Skip to content

Commit 301485e

Browse files
committed
final output fix
1 parent de6f3fa commit 301485e

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

main.go

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func main() {
4343

4444
// version
4545
if *pFinderVersion {
46-
fmt.Println("fastfinder v1.4")
46+
fmt.Println("fastfinder v1.4.1")
4747
if !Contains(os.Args, "-c") && !Contains(os.Args, "--configuration") {
4848
os.Exit(0)
4949
}
@@ -247,13 +247,21 @@ func main() {
247247
}
248248
}
249249

250-
// copy matching files
251-
if len(*matchContent) > 0 && config.Output.CopyMatchingFiles {
252-
LogMessage(LOG_INFO, "[INFO]", "Copy all matching files")
253-
InitProgressbar(int64(len(*matchPattern)))
254-
for _, f := range *matchContent {
255-
ProgressBarStep()
256-
FileCopy(f, config.Output.FilesCopyPath, config.Output.Base64Files)
250+
// listing and copy matching files
251+
LogMessage(LOG_INFO, "[INFO]", "scan finished in", basePath)
252+
if len(*matchContent) > 0 {
253+
LogMessage(LOG_INFO, "[INFO]", "Matching files: ")
254+
for _, p := range *matchContent {
255+
LogMessage(LOG_INFO, " |", p)
256+
}
257+
258+
if config.Output.CopyMatchingFiles {
259+
LogMessage(LOG_INFO, "[INFO]", "Copy all matching files")
260+
InitProgressbar(int64(len(*matchPattern)))
261+
for _, f := range *matchContent {
262+
ProgressBarStep()
263+
FileCopy(f, config.Output.FilesCopyPath, config.Output.Base64Files)
264+
}
257265
}
258266
} else {
259267
LogMessage(LOG_INFO, "[INFO]", "No match found")

0 commit comments

Comments
 (0)