Skip to content
  • Antoine Beaupré's avatar
    API change: allow absolute path in folder setting · 04639ec1
    Antoine Beaupré authored
    This resolves a bunch of issues, detailed in #14. But basically, I was
    assuming users would never specify an absolute path in `folder`. But
    it turns out this was natural for at least one user: they specified
    the full path there. And it actually works! Somehow the code was
    finding the right path for the folder. But the problem with that is
    that the `prefix` (the `mailbox` setting) would get created
    anyways.
    
    In a more extreme case, a user could possibly not specify a `mailbox`
    at all and manually set a `folder` per feed, then would get a
    `~/Mailbox` created even if *no* `folder` would reference this
    folder (because that is the default "prefix").
    
    The fix is surprisingly simple: just check if the provided folder is
    an absolute path, and just prepend the prefix if it's not absolute.
    
    We also need to create directories based on the resulting folder path,
    not the prefix, in case we just don't use the prefix.
    
    This is an API change, as the (undocumented) semantics of the
    configuration file get changed.
    
    Closes: #14
    04639ec1