Skip to content

config: FilenameAttribute doesn't handle quotes well #2263

@dgw

Description

@dgw

Description

If the value of a FilenameAttribute set in the config file is quoted, it silently creates a mess.

Reproduction steps

  1. Set core.logdir = "/path/to/logs"
  2. Run Sopel
  3. Sopel quietly creates a silly directory tree inside $HOMEDIR:
$ tree ~/.sopel
/home/dgw/.sopel
├── "
│   └── path
│       └── to
│           └── logs"
│               ├── default.error.log
│               ├── default.exceptions.log
│               ├── default.raw.log
│               └── default.sopel.log
...

Expected behavior

Even though quotes aren't required in Sopel's config file, they should be sensibly handled.

Environment

  • Sopel .version: current master, aca1055
  • Sopel installed via: -e . @ above commit
  • Python version: 3.8, 3.9
  • Operating system: Ubuntu 20.04 (WSL)

Notes

This is a leftover todo from #1959, where I updated the docs but didn't make any code changes related to this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugThings to squish; generally used for issues

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions