portainer/portainer

View on GitHub
api/filesystem/copy.go

Summary

Maintainability
A
40 mins
Test Coverage

Function CopyDir has 6 return statements (exceeds 4 allowed).
Open

func CopyDir(fromDir, toDir string, keepParent bool) error {
    cleanedSourcePath := filepath.Clean(fromDir)
    parentDirectory := filepath.Dir(cleanedSourcePath)
    err := filepath.Walk(cleanedSourcePath, func(path string, info os.FileInfo, err error) error {
        if err != nil {
Severity: Major
Found in api/filesystem/copy.go - About 40 mins to fix

    There are no issues that match your filters.

    Category
    Status