1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-06-01 05:38:47 +00:00

fixes #1314: do not use the defines INSTALL_FOLDER/SHARED_FOLDER in read_restore (), but the corresponding values from the folder config

This commit is contained in:
philsmd 2017-08-10 14:39:54 +02:00
parent ae5a97a95b
commit 16df4564ce
No known key found for this signature in database
GPG Key ID: 4F25D016D9D6A8AF

View File

@ -158,21 +158,18 @@ static int read_restore (hashcat_ctx_t *hashcat_ctx)
* updated folders * updated folders
*/ */
const char *install_folder = NULL; // copy the paths of INSTALL_FOLDER and SHARED_FOLDER from the folder config:
const char *shared_folder = NULL;
#if defined (INSTALL_FOLDER) char *install_folder = hcstrdup (folder_config->install_dir);
install_folder = INSTALL_FOLDER; char *shared_folder = hcstrdup (folder_config->shared_dir);
#endif
#if defined (SHARED_FOLDER)
shared_folder = SHARED_FOLDER;
#endif
folder_config_destroy (hashcat_ctx); folder_config_destroy (hashcat_ctx);
const int rc_folder_config_init = folder_config_init (hashcat_ctx, install_folder, shared_folder); 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; if (rc_folder_config_init == -1) return -1;
/** /**