mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-29 03:33:47 +02:00
Path.Join()
This commit is contained in:
@@ -116,7 +116,7 @@ namespace VRCX
|
||||
{
|
||||
StartInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = Path.Combine(Program.BaseDirectory, "VRCX.exe"),
|
||||
FileName = Path.Join(Program.BaseDirectory, "VRCX.exe"),
|
||||
Arguments = string.Join(' ', args),
|
||||
UseShellExecute = true,
|
||||
WorkingDirectory = Program.BaseDirectory
|
||||
@@ -128,7 +128,7 @@ namespace VRCX
|
||||
|
||||
public override bool CheckForUpdateExe()
|
||||
{
|
||||
return File.Exists(Path.Combine(Program.AppDataDirectory, "update.exe"));
|
||||
return File.Exists(Path.Join(Program.AppDataDirectory, "update.exe"));
|
||||
}
|
||||
|
||||
public override void ExecuteAppFunction(string function, string json)
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace VRCX
|
||||
public string CustomVrScriptPath()
|
||||
{
|
||||
var output = string.Empty;
|
||||
var filePath = Path.Combine(Program.AppDataDirectory, "customvr.js");
|
||||
var filePath = Path.Join(Program.AppDataDirectory, "customvr.js");
|
||||
if (File.Exists(filePath))
|
||||
output = filePath;
|
||||
return output;
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace VRCX
|
||||
}
|
||||
}
|
||||
|
||||
return Path.Combine(GetVRChatAppDataLocation(), "Cache-WindowsPlayer");
|
||||
return Path.Join(GetVRChatAppDataLocation(), "Cache-WindowsPlayer");
|
||||
}
|
||||
|
||||
public override string GetVRChatPhotosLocation()
|
||||
@@ -54,7 +54,7 @@ namespace VRCX
|
||||
}
|
||||
}
|
||||
|
||||
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures), "VRChat");
|
||||
return Path.Join(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures), "VRChat");
|
||||
}
|
||||
|
||||
public override string GetUGCPhotoLocation(string path = "")
|
||||
@@ -81,7 +81,7 @@ namespace VRCX
|
||||
|
||||
private string GetSteamUserdataPathFromRegistry()
|
||||
{
|
||||
string steamUserdataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), @"Steam\userdata");
|
||||
string steamUserdataPath = Path.Join(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), @"Steam\userdata");
|
||||
|
||||
try
|
||||
{
|
||||
@@ -92,7 +92,7 @@ namespace VRCX
|
||||
object o = key.GetValue("InstallPath");
|
||||
if (o != null)
|
||||
{
|
||||
steamUserdataPath = Path.Combine(o.ToString(), @"userdata");
|
||||
steamUserdataPath = Path.Join(o.ToString(), @"userdata");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -117,7 +117,7 @@ namespace VRCX
|
||||
var steamUserDirs = Directory.GetDirectories(steamUserdataPath);
|
||||
foreach (var steamUserDir in steamUserDirs)
|
||||
{
|
||||
var screenshotDir = Path.Combine(steamUserDir, @"760\remote\438100\screenshots");
|
||||
var screenshotDir = Path.Join(steamUserDir, @"760\remote\438100\screenshots");
|
||||
if (!Directory.Exists(screenshotDir))
|
||||
continue;
|
||||
|
||||
@@ -184,7 +184,7 @@ namespace VRCX
|
||||
|
||||
public override bool OpenCrashVrcCrashDumps()
|
||||
{
|
||||
var path = Path.Combine(Path.GetTempPath(), "VRChat", "VRChat", "Crashes");
|
||||
var path = Path.Join(Path.GetTempPath(), "VRChat", "VRChat", "Crashes");
|
||||
if (!Directory.Exists(path))
|
||||
return false;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace VRCX
|
||||
|
||||
if (Wine.GetIfWine())
|
||||
{
|
||||
var wineTmpPath = Path.Combine(Program.AppDataDirectory, "wine.tmp");
|
||||
var wineTmpPath = Path.Join(Program.AppDataDirectory, "wine.tmp");
|
||||
if (File.Exists(wineTmpPath))
|
||||
{
|
||||
var wineTmp = File.ReadAllText(wineTmpPath);
|
||||
@@ -122,7 +122,7 @@ namespace VRCX
|
||||
public override bool StartGameFromPath(string path, string arguments)
|
||||
{
|
||||
if (!path.EndsWith(".exe"))
|
||||
path = Path.Combine(path, "launch.exe");
|
||||
path = Path.Join(path, "launch.exe");
|
||||
|
||||
if (!path.EndsWith("launch.exe") || !File.Exists(path))
|
||||
return false;
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace VRCX
|
||||
if (changeFilename)
|
||||
{
|
||||
var newFileName = $"{fileName}_{worldId}";
|
||||
var newPath = Path.Combine(Path.GetDirectoryName(path), newFileName + Path.GetExtension(path));
|
||||
var newPath = Path.Join(Path.GetDirectoryName(path), newFileName + Path.GetExtension(path));
|
||||
File.Move(path, newPath);
|
||||
path = newPath;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user