Fixed directory creation checks.
This commit is contained in:
parent
dd1a03191d
commit
d3a88014da
@ -474,9 +474,12 @@ rdpSettings* freerdp_settings_new(DWORD flags)
|
||||
goto out_fail;
|
||||
base = GetKnownSubPath(KNOWN_PATH_XDG_CONFIG_HOME,
|
||||
FREERDP_VENDOR_STRING);
|
||||
if (base && CreateDirectoryA(base, NULL))
|
||||
if (base)
|
||||
{
|
||||
settings->ConfigPath = GetCombinedPath(base, FREERDP_PRODUCT_STRING);
|
||||
if (!PathFileExistsA(base))
|
||||
if (!CreateDirectoryA(base, NULL))
|
||||
settings->ConfigPath = NULL;
|
||||
}
|
||||
free (base);
|
||||
|
||||
|
@ -203,6 +203,9 @@ static char* GetPath_XDG_CACHE_HOME(void)
|
||||
home = GetPath_XDG_RUNTIME_DIR();
|
||||
|
||||
path = GetCombinedPath(home, "cache");
|
||||
if (!PathFileExistsA(path))
|
||||
if (!CreateDirectoryA(path, NULL))
|
||||
path = NULL;
|
||||
free(home);
|
||||
#else
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user