Skip to content

Commit

Permalink
final output fix
Browse files Browse the repository at this point in the history
  • Loading branch information
codeyourweb committed Dec 12, 2021
1 parent de6f3fa commit 301485e
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func main() {

// version
if *pFinderVersion {
fmt.Println("fastfinder v1.4")
fmt.Println("fastfinder v1.4.1")
if !Contains(os.Args, "-c") && !Contains(os.Args, "--configuration") {
os.Exit(0)
}
Expand Down Expand Up @@ -247,13 +247,21 @@ func main() {
}
}

// copy matching files
if len(*matchContent) > 0 && config.Output.CopyMatchingFiles {
LogMessage(LOG_INFO, "[INFO]", "Copy all matching files")
InitProgressbar(int64(len(*matchPattern)))
for _, f := range *matchContent {
ProgressBarStep()
FileCopy(f, config.Output.FilesCopyPath, config.Output.Base64Files)
// listing and copy matching files
LogMessage(LOG_INFO, "[INFO]", "scan finished in", basePath)
if len(*matchContent) > 0 {
LogMessage(LOG_INFO, "[INFO]", "Matching files: ")
for _, p := range *matchContent {
LogMessage(LOG_INFO, " |", p)
}

if config.Output.CopyMatchingFiles {
LogMessage(LOG_INFO, "[INFO]", "Copy all matching files")
InitProgressbar(int64(len(*matchPattern)))
for _, f := range *matchContent {
ProgressBarStep()
FileCopy(f, config.Output.FilesCopyPath, config.Output.Base64Files)
}
}
} else {
LogMessage(LOG_INFO, "[INFO]", "No match found")
Expand Down

0 comments on commit 301485e

Please sign in to comment.