Commit 9a2fd5aa authored by Vadim Rutkovsky's avatar Vadim Rutkovsky

Check that Query.music_folder and Query.download_folder are not empty

https://bugzilla.gnome.org/show_bug.cgi?id=753258
parent 07567890
......@@ -12,8 +12,8 @@ without warranty of any kind.
Basic Installation
==================
Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
Briefly, the shell command `./configure && make && make install'
should configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package. Some packages provide this
`INSTALL' file but do not implement all of the features documented
......
......@@ -48,13 +48,15 @@ class Query():
def __init__(self):
try:
Query.music_folder = GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_MUSIC)
except TypeError:
assert Query.music_folder is not None
except (TypeError, AssertionError):
logger.warn("XDG Music dir is not set")
return
try:
Query.download_folder = GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_DOWNLOAD)
except TypeError:
assert Query.download_folder is not None
except (TypeError, AssertionError):
logger.warn("XDG Download dir is not set")
return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment