Refactor directory handling and path construction

This commit is contained in:
kqnori
2026-06-28 12:45:30 +02:00
committed by GitHub
parent 810f2bd0fb
commit 21343e9835
+6 -1
View File
@@ -69,6 +69,11 @@ else
void unrarfix(string fixfile)
{
Directory.SetCurrentDirectory(Directory.GetParent(fixfile).FullName);
Console.WriteLine($"Current directory: {Directory.GetCurrentDirectory()}");
string mainfile = Directory.GetFiles(Directory.GetCurrentDirectory(), "*.rar")[0];
// string fixfile = Directory.GetFiles(Directory.GetCurrentDirectory() + "/Fix Repair", "*.rar")[0];
Console.WriteLine($"Main file: {mainfile}");
@@ -109,7 +114,7 @@ void unrarfix(string fixfile)
Console.WriteLine($"Game name: {gamename}");
gamepath = userProfilePath + "/Documents/games/" + gamename;
gamepath = Path.Combine(userProfilePath, "Documents", "games", gamename);
Directory.Move(dirtomove, gamepath);