Bug 1466226 - newsbeuter falls back to $HOME/.newsbeuter if xdg data dir doesn't exist
newsbeuter falls back to $HOME/.newsbeuter if xdg data dir doesn't exist
Status: NEW
Product: Fedora
Classification: Fedora
Component: newsbeuter (Show other bugs)
25
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Ben Boeckel
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-29 05:44 EDT by Stefan Assmann
Modified: 2017-06-29 05:44 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Stefan Assmann 2017-06-29 05:44:28 EDT
Description of problem:
When starting newsbeuter the following message is displayed
XDG: configuration directory '/home/sassmann/.config/newsbeuter' not accessible, using '/home/sassmann/.newsbeuter' instead.
Fine, I move my /home/sassmann/.newsbeuter directory to /home/sassmann/.config/newsbeuter

Now starting newsbeuter again I see
XDG: data directory '/home/sassmann/.local/share/newsbeuter' not accessible, using '/home/sassmann/.newsbeuter' instead.
Starting newsbeuter 2.9...
Loading configuration...done.
Opening cache...done.
Loading URLs from /home/sassmann/.newsbeuter/urls...done.
Error: no URLs configured. Please fill the file /home/sassmann/.newsbeuter/urls with RSS feed URLs or import an OPML file.

Which means after reading /home/sassmann/.config/newsbeuter/config the xdg data dir is probed and if it doesn't exist everything falls back to .newsbeuter. But the urls haven't been read yet and are now being looked for in .newsbeuter instead of .config/newsbeuter.

Silly workaround: mkdir /home/sassmann/.local/share/newsbeuter

Suggestion on how to fix this:
If .config/newsbeuter exists but .local/share/newsbeuter does not, then try to create .local/share/newsbeuter.
or to phrase this more generic
if xdg config dir exists but xdg data dir does not, try to create xdg data dir.

Version-Release number of selected component (if applicable):
newsbeuter-2.9-2.fc24.x86_64

Note You need to log in before you can comment on or make changes to this bug.