2013-03-22 08:42:09 +04:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <winpr/crt.h>
|
|
|
|
#include <winpr/path.h>
|
|
|
|
#include <winpr/tchar.h>
|
|
|
|
#include <winpr/winpr.h>
|
|
|
|
|
|
|
|
int TestPathShell(int argc, char* argv[])
|
|
|
|
{
|
|
|
|
char* path;
|
|
|
|
|
|
|
|
path = GetKnownPath(KNOWN_PATH_HOME);
|
2015-06-17 23:08:02 +03:00
|
|
|
if (!path)
|
|
|
|
return -1;
|
2013-03-22 08:42:09 +04:00
|
|
|
printf("KNOWN_PATH_HOME: %s\n", path);
|
|
|
|
|
|
|
|
path = GetKnownPath(KNOWN_PATH_TEMP);
|
2015-06-17 23:08:02 +03:00
|
|
|
if (!path)
|
|
|
|
return -1;
|
2013-03-22 08:42:09 +04:00
|
|
|
printf("KNOWN_PATH_TEMP: %s\n", path);
|
|
|
|
|
2013-03-23 00:03:42 +04:00
|
|
|
path = GetKnownPath(KNOWN_PATH_XDG_DATA_HOME);
|
2015-06-17 23:08:02 +03:00
|
|
|
if (!path)
|
|
|
|
return -1;
|
2013-03-22 08:42:09 +04:00
|
|
|
printf("KNOWN_PATH_DATA: %s\n", path);
|
|
|
|
|
2013-03-23 00:03:42 +04:00
|
|
|
path = GetKnownPath(KNOWN_PATH_XDG_CONFIG_HOME);
|
2015-06-17 23:08:02 +03:00
|
|
|
if (!path)
|
|
|
|
return -1;
|
2013-03-22 08:42:09 +04:00
|
|
|
printf("KNOWN_PATH_CONFIG: %s\n", path);
|
|
|
|
|
2013-03-23 00:03:42 +04:00
|
|
|
path = GetKnownPath(KNOWN_PATH_XDG_CACHE_HOME);
|
2015-06-17 23:08:02 +03:00
|
|
|
if (!path)
|
|
|
|
return -1;
|
2013-03-22 08:42:09 +04:00
|
|
|
printf("KNOWN_PATH_CACHE: %s\n", path);
|
|
|
|
|
2013-03-23 00:03:42 +04:00
|
|
|
path = GetKnownPath(KNOWN_PATH_XDG_RUNTIME_DIR);
|
2015-06-17 23:08:02 +03:00
|
|
|
if (!path)
|
|
|
|
return -1;
|
2013-03-22 08:42:09 +04:00
|
|
|
printf("KNOWN_PATH_RUNTIME: %s\n", path);
|
|
|
|
|
2013-03-23 00:03:42 +04:00
|
|
|
path = GetKnownSubPath(KNOWN_PATH_XDG_CONFIG_HOME, "freerdp");
|
2015-06-17 23:08:02 +03:00
|
|
|
if (!path)
|
|
|
|
return -1;
|
2013-03-22 23:52:43 +04:00
|
|
|
printf("KNOWN_PATH_CONFIG SubPath: %s\n", path);
|
|
|
|
|
2013-03-22 08:42:09 +04:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|