Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

fix: add quotes to clamscan exclude options #1783

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scanner/families/malware/clam/clam.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ func (s *Scanner) Run(sourceType utils.SourceType, userInput string) error {
// --exclude=REGEX, --exclude-dir=REGEX
// Don't scan file/directory names matching regular expression. These options can be used multiple times.
for _, file := range s.config.ClamScanExcludeFiles {
args = append(args, "--exclude="+file)
args = append(args, fmt.Sprintf("--exclude=%q", file))
}

for _, dir := range s.config.ClamScanExcludeDirs {
args = append(args, "--exclude-dir="+dir)
args = append(args, fmt.Sprintf("--exclude-dir=%q", dir))
}

// Append files/directories to scan as a last argument - clamscan [options] [file/directory/-]
Expand Down
Loading