Commit 7f59ad7f authored by ale's avatar ale

Do not fail if path is not set on the file source

It may be set on the atom instead.
parent 1db91b00
...@@ -2,7 +2,6 @@ package tabacco ...@@ -2,7 +2,6 @@ package tabacco
import ( import (
"context" "context"
"errors"
"path/filepath" "path/filepath"
"git.autistici.org/ai3/tools/tabacco/jobs" "git.autistici.org/ai3/tools/tabacco/jobs"
...@@ -13,11 +12,7 @@ type fileHandler struct { ...@@ -13,11 +12,7 @@ type fileHandler struct {
} }
func newFileHandler(name string, params Params) (Handler, error) { func newFileHandler(name string, params Params) (Handler, error) {
path := params.Get("path") return &fileHandler{path: params.Get("path")}, nil
if path == "" {
return nil, errors.New("path not set")
}
return &fileHandler{path: path}, nil
} }
// Convert the atom to a path. // Convert the atom to a path.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment