in https://github.com/graymeta/stow/blob/973a61f346d598a566affb53c4698764a67df164/local/container.go#L132
info, err := os.Stat(path)
if os.IsNotExist(err) {
return nil, stow.ErrNotFound
}
if info.IsDir() {
return nil, errors.New("unexpected directory")
}
if the stat fails because the path is not valid and so if the error is differetn than not exist, info is nil and so the line info.IsDir panics with runtime error: invalid memory address or nil pointer dereference
The correct behaviour should be to return an error if stat fails
in https://github.com/graymeta/stow/blob/973a61f346d598a566affb53c4698764a67df164/local/container.go#L132
if the
statfails because the path is not valid and so if the error is differetn than not exist,infois nil and so the line info.IsDir panics with runtime error: invalid memory address or nil pointer dereferenceThe correct behaviour should be to return an error if stat fails