|
|
@ -480,12 +480,10 @@ int folder_config_init (hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const char *ins
|
|
|
|
|
|
|
|
|
|
|
|
cache_dir = NULL;
|
|
|
|
cache_dir = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hcfree (session_dir);
|
|
|
|
hcfree (session_dir);
|
|
|
|
|
|
|
|
|
|
|
|
session_dir = NULL;
|
|
|
|
session_dir = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hcfree (cpath_real);
|
|
|
|
hcfree (cpath_real);
|
|
|
|
|
|
|
|
|
|
|
|
cpath_real = NULL;
|
|
|
|
cpath_real = NULL;
|
|
|
@ -571,25 +569,21 @@ int hc_mkdir (const char *name, MAYBE_UNUSED const int mode)
|
|
|
|
|
|
|
|
|
|
|
|
int hc_mkdir_rec (const char *path, MAYBE_UNUSED const int mode)
|
|
|
|
int hc_mkdir_rec (const char *path, MAYBE_UNUSED const int mode)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
char *subpath, *fullpath;
|
|
|
|
char *fullpath = hcstrdup (path);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
char *subpath = dirname (fullpath);
|
|
|
|
|
|
|
|
|
|
|
|
fullpath = hcstrdup (path);
|
|
|
|
|
|
|
|
subpath = dirname (fullpath);
|
|
|
|
|
|
|
|
if (strlen (subpath) > 1)
|
|
|
|
if (strlen (subpath) > 1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (hc_mkdir_rec (subpath, mode) == -1) {
|
|
|
|
if (hc_mkdir_rec (subpath, mode) == -1) return -1;
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (hc_mkdir (path, mode) == -1)
|
|
|
|
if (hc_mkdir (path, mode) == -1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (errno != EEXIST)
|
|
|
|
if (errno != EEXIST) return -1;
|
|
|
|
{
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
hcfree (fullpath);
|
|
|
|
hcfree (fullpath);
|
|
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|