mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-05 22:36:05 +02:00
Fix custom VRC cache path
This commit is contained in:
@@ -21,21 +21,25 @@ namespace VRCX
|
|||||||
|
|
||||||
public override string GetVRChatCacheLocation()
|
public override string GetVRChatCacheLocation()
|
||||||
{
|
{
|
||||||
var json = ReadConfigFile();
|
var defaultPath = Path.Join(GetVRChatAppDataLocation(), "Cache-WindowsPlayer");
|
||||||
if (!string.IsNullOrEmpty(json))
|
|
||||||
{
|
|
||||||
var obj = JsonConvert.DeserializeObject<JObject>(json);
|
|
||||||
if (obj["cache_directory"] != null)
|
|
||||||
{
|
|
||||||
var cacheDir = (string)obj["cache_directory"];
|
|
||||||
if (!string.IsNullOrEmpty(cacheDir) && Directory.Exists(cacheDir))
|
|
||||||
{
|
|
||||||
return cacheDir;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return Path.Join(GetVRChatAppDataLocation(), "Cache-WindowsPlayer");
|
var json = ReadConfigFile();
|
||||||
|
if (string.IsNullOrEmpty(json))
|
||||||
|
return defaultPath;
|
||||||
|
|
||||||
|
var obj = JsonConvert.DeserializeObject<JObject>(json);
|
||||||
|
if (obj["cache_directory"] == null)
|
||||||
|
return defaultPath;
|
||||||
|
|
||||||
|
var cacheDir = (string)obj["cache_directory"];
|
||||||
|
if (string.IsNullOrEmpty(cacheDir))
|
||||||
|
return defaultPath;
|
||||||
|
|
||||||
|
var cachePath = Path.Join(cacheDir, "Cache-WindowsPlayer");
|
||||||
|
if (!Directory.Exists(cacheDir))
|
||||||
|
return defaultPath;
|
||||||
|
|
||||||
|
return cachePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string GetVRChatPhotosLocation()
|
public override string GetVRChatPhotosLocation()
|
||||||
|
|||||||
Reference in New Issue
Block a user