From 16df4564ce04e2cb26f204ed7528ae825fdbe6ee Mon Sep 17 00:00:00 2001 From: philsmd Date: Thu, 10 Aug 2017 14:39:54 +0200 Subject: [PATCH] fixes #1314: do not use the defines INSTALL_FOLDER/SHARED_FOLDER in read_restore (), but the corresponding values from the folder config --- src/restore.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/restore.c b/src/restore.c index 82a2e14b2..d7d621452 100644 --- a/src/restore.c +++ b/src/restore.c @@ -158,21 +158,18 @@ static int read_restore (hashcat_ctx_t *hashcat_ctx) * updated folders */ - const char *install_folder = NULL; - const char *shared_folder = NULL; + // copy the paths of INSTALL_FOLDER and SHARED_FOLDER from the folder config: - #if defined (INSTALL_FOLDER) - install_folder = INSTALL_FOLDER; - #endif - - #if defined (SHARED_FOLDER) - shared_folder = SHARED_FOLDER; - #endif + char *install_folder = hcstrdup (folder_config->install_dir); + char *shared_folder = hcstrdup (folder_config->shared_dir); folder_config_destroy (hashcat_ctx); const int rc_folder_config_init = folder_config_init (hashcat_ctx, install_folder, shared_folder); + hcfree (install_folder); + hcfree (shared_folder); + if (rc_folder_config_init == -1) return -1; /**