Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit dba5632

Browse files
Trying to move the files into the target as opposed to moving the whole thing
1 parent ae4f4f6 commit dba5632

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/GitHub.Api/Installer/OctorunInstaller.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,15 @@ private NPath MoveOctorun(NPath fromPath)
5555

5656
Logger.Info("MoveOctorun fromPath: {0} toPath:{1}", fromPath.ToString(), toPath.ToString());
5757

58-
toPath.DeleteIfExists();
59-
toPath.EnsureParentDirectoryExists();
58+
Logger.Info("DeleteContents toPath:{0}", toPath.ToString());
59+
toPath.DeleteContents();
6060

61-
Logger.Info("toPath Exists: {0}", toPath.Exists());
61+
Logger.Info("MoveFiles fromPath: {0} toPath:{1}", fromPath.ToString(), toPath.ToString());
62+
fromPath.MoveFiles(toPath, true);
6263

63-
fromPath.Move(toPath);
64+
Logger.Info("Delete fromPath:{0}", fromPath.ToString());
6465
fromPath.Parent.Delete();
66+
6567
return installDetails.ExecutablePath;
6668
}
6769

0 commit comments

Comments
 (0)