Skip to content

bug: errors ignored in IncrementPomodoroCountForActiveTask filepath.Walk #8

@LudoLoops

Description

@LudoLoops

Issue

In task/task.go:318-330, file reading errors are silently ignored.

filepath.Walk(projectTasksPath, func(path string, info os.FileInfo, err error) error {
    if err != nil || info.IsDir() || !strings.HasSuffix(info.Name(), ".md") {
        return nil  // ← Errors silently ignored
    }
    // ...
})

Problem

  • Permission errors are silently ignored
  • File system errors not reported
  • User has no idea if task file lookup failed

Solution

if err != nil {
    fmt.Printf("[WARN] Error reading %s: %v\n", path, err)
    return nil  // Skip this file but continue
}

Impact

🟡 Medium - Silent failures

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions