diff --git a/operator/builtin/input/file/file.go b/operator/builtin/input/file/file.go index a452ad76..19d82295 100644 --- a/operator/builtin/input/file/file.go +++ b/operator/builtin/input/file/file.go @@ -318,7 +318,7 @@ func (f *InputOperator) newReader(file *os.File, fp *Fingerprint, firstCheck boo if err != nil { return nil, err } - newReader.SetPath(file.Name()) + newReader.fileAttributes = resolveFileAttributes(file.Name()) return newReader, nil } diff --git a/operator/builtin/input/file/reader.go b/operator/builtin/input/file/reader.go index e858fa0f..d8349bd6 100644 --- a/operator/builtin/input/file/reader.go +++ b/operator/builtin/input/file/reader.go @@ -88,11 +88,6 @@ func (f *InputOperator) NewReader(path string, file *os.File, fp *Fingerprint) ( return r, nil } -// SetPath sets fileAttributes based on new path -func (r *Reader) SetPath(path string) { - r.fileAttributes = resolveFileAttributes(path) -} - // Copy creates a deep copy of a Reader func (f *Reader) Copy(file *os.File) (*Reader, error) { reader, err := f.fileInput.NewReader(f.fileAttributes.Path, file, f.Fingerprint.Copy())