fix: non-abs path in config

This commit is contained in:
Yannik Schmidt
2024-05-11 18:15:40 +02:00
parent 3367f9de03
commit 6d80708172

View File

@@ -281,6 +281,10 @@ if __name__ == "__main__":
install_dir = config_loaded["Install dir:"] install_dir = config_loaded["Install dir:"]
backend_type = config_loaded["Select option:"] backend_type = config_loaded["Select option:"]
# fix abs path if not set #
if os.path.abspath(install_dir):
install_dir = os.path.join(os.getcwd(), install_dir)
# get the secod part of the server string, then split once at first / to get path and prepend / again# # get the secod part of the server string, then split once at first / to get path and prepend / again#
if backend_type == "FTP/FTPS": if backend_type == "FTP/FTPS":
remote_root_dir = "/" + config_loaded["Server/Path:"].split("://")[1].split("/", 1)[1] remote_root_dir = "/" + config_loaded["Server/Path:"].split("://")[1].split("/", 1)[1]