get_xdir_fs() cleanup
This commit is contained in:
parent
ca3fa043f0
commit
6f1185c00e
|
@ -316,20 +316,18 @@ get_xdir_fs (void)
|
||||||
{
|
{
|
||||||
if (!xdir_fs)
|
if (!xdir_fs)
|
||||||
{
|
{
|
||||||
if (portable_mode ())
|
char out[256];
|
||||||
|
|
||||||
|
if (portable_mode () || !get_reg_str ("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "AppData", out, sizeof (out)))
|
||||||
{
|
{
|
||||||
xdir_fs = ".\\config";
|
xdir_fs = ".\\config";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char out[256];
|
|
||||||
|
|
||||||
if (!get_reg_str ("Software\\Microsoft\\Windows\\CurrentVersion\\"
|
|
||||||
"Explorer\\Shell Folders", "AppData", out, sizeof (out)))
|
|
||||||
return "./config";
|
|
||||||
xdir_fs = g_strdup_printf ("%s\\" "HexChat", out);
|
xdir_fs = g_strdup_printf ("%s\\" "HexChat", out);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return xdir_fs;
|
return xdir_fs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue