diff --git a/borg_interface/bin/borg b/borg_interface/bin/borg deleted file mode 100755 index 39808f9..0000000 Binary files a/borg_interface/bin/borg and /dev/null differ diff --git a/borg_interface/interface_functions.py b/borg_interface/interface_functions.py index 215e1f3..946406d 100644 --- a/borg_interface/interface_functions.py +++ b/borg_interface/interface_functions.py @@ -47,12 +47,15 @@ def configuration(): # check whether the config file exists either in the home folder or next to # the binary home = os.getenv('HOME') - if os.path.isfile(home + '/.config/borg_interface/borg_interface.cfg'): - config.read(home + '/.config/borg_interface/borg_interface.cfg') - elif os.path.isfile(home + '/.borg_interface.cfg'): - config.read(home + '/.borg_interface.cfg') - elif os.path.isfile('borg_interface.cfg'): - config.read('borg_interface.cfg') + config_file = "borg_interface.cfg" + config_long_path = home + "/.config/borg_interface/" + config_file + config_short_path = home + "/." + config_file + if os.path.isfile(config_long_path): + config.read(config_long_path) + elif os.path.isfile(config_short_path): + config.read(config_short_path) + elif os.path.isfile(config_file): + config.read(config_file) else: print("Configuration file not found.") quit()