Skip to content

Commit

Permalink
fix rdc bug (#285)and fix phase2 uninstallation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
rounk-ctrl committed Oct 6, 2023
1 parent 1bef57a commit 2970eb5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
15 changes: 14 additions & 1 deletion Rectify11.Phase2/Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,20 @@ public static bool SafeFileCopy(string src, string dest)
return false;
}
}
public static void ImportReg(string path)
public static bool SafeFileMove(string src, string dest)
{
try
{
if (!SafeFileDeletion(dest)) return false;
File.Move(src, dest);
return true;
}
catch
{
return false;
}
}
public static void ImportReg(string path)
{
try
{
Expand Down
6 changes: 3 additions & 3 deletions Rectify11.Phase2/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ private static void Main(string[] args)
string finalPath = FixString(patches.Items[j].HardlinkTarget, false);
Console.WriteLine("Backup: " + backupPath);
Console.WriteLine("Final: " + finalPath);
SafeFileCopy(backupPath, finalPath);
SafeFileMove(backupPath, finalPath);
lastfile = uninstallFiles[k];
}
}
Expand All @@ -234,7 +234,7 @@ private static void Main(string[] args)
string finalPath = FixString(patches.Items[j].HardlinkTarget, true);
Console.WriteLine("Backup: " + backupPath);
Console.WriteLine("Final: " + finalPath);
SafeFileCopy(backupPath, finalPath);
SafeFileMove(backupPath, finalPath);
}
}
}
Expand All @@ -246,7 +246,7 @@ private static void Main(string[] args)
string finalPath = FixString(patches.Items[j].HardlinkTarget, false);
Console.WriteLine("Backup: " + backupDiagDir[i]);
Console.WriteLine("Final: " + finalPath + "\n");
SafeFileCopy(backupDiagDir[i], finalPath);
SafeFileMove(backupDiagDir[i], finalPath);
}
}
}
Expand Down
Binary file modified Rectify11Installer/Resources/files.7z
Binary file not shown.
2 changes: 1 addition & 1 deletion RectifyControlPanel2

0 comments on commit 2970eb5

Please sign in to comment.