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

Commit 9223ade

Browse files
Avoiding using the output of the zip Task because it will shorten the path names
1 parent 10f1289 commit 9223ade

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/GitHub.Api/Installer/CopyHelper.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ public static void CopyFolder(NPath fromPath, NPath toPath)
4949
public static void CopyFolderContents(NPath fromPath, NPath toPath)
5050
{
5151
Logger.Trace("CopyFolderContents fromPath: {0} toPath:{1}", fromPath.ToString(), toPath.ToString());
52-
5352
toPath.DeleteContents();
5453
fromPath.MoveFiles(toPath, true);
5554
}

src/GitHub.Api/Installer/GitInstaller.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -301,13 +301,13 @@ private GitInstallationState ExtractGit(GitInstallationState state)
301301
return true;
302302
});
303303
unzipTask.Progress(p => Progress.UpdateProgress(40 + (long)(20 * p.Percentage), 100, unzipTask.Message));
304-
var source = unzipTask.RunSynchronously();
304+
unzipTask.RunSynchronously();
305305
var target = state.GitInstallationPath;
306306
if (unzipTask.Successful)
307307
{
308-
Logger.Trace("Moving Git source:{0} target:{1}", source.ToString(), target.ToString());
308+
Logger.Trace("Moving Git source:{0} target:{1}", gitExtractPath.ToString(), target.ToString());
309309

310-
CopyHelper.Copy(source, target);
310+
CopyHelper.Copy(gitExtractPath, target);
311311

312312
state.GitIsValid = true;
313313

@@ -327,13 +327,13 @@ private GitInstallationState ExtractGit(GitInstallationState state)
327327
return true;
328328
});
329329
unzipTask.Progress(p => Progress.UpdateProgress(60 + (long)(20 * p.Percentage), 100, unzipTask.Message));
330-
var source = unzipTask.RunSynchronously();
330+
unzipTask.RunSynchronously();
331331
var target = state.GitLfsInstallationPath;
332332
if (unzipTask.Successful)
333333
{
334-
Logger.Trace("Moving GitLFS source:{0} target:{1}", source.ToString(), target.ToString());
334+
Logger.Trace("Moving GitLFS source:{0} target:{1}", gitLfsExtractPath.ToString(), target.ToString());
335335

336-
CopyHelper.Copy(source, target);
336+
CopyHelper.Copy(gitLfsExtractPath, target);
337337

338338
state.GitLfsIsValid = true;
339339
}

src/GitHub.Api/Installer/OctorunInstaller.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,13 @@ public NPath SetupOctorunIfNeeded()
3333

3434
GrabZipFromResources();
3535

36-
var tempZipExtractPath = NPath.CreateTempDirectory("octorun_extract_archive_path");
36+
var extractPath = NPath.CreateTempDirectory("octorun_extract_archive_path");
3737
var unzipTask = new UnzipTask(taskManager.Token, installDetails.ZipFile,
38-
tempZipExtractPath, sharpZipLibHelper,
38+
extractPath, sharpZipLibHelper,
3939
fileSystem)
4040
.Catch(e => { Logger.Error(e, "Error extracting octorun"); return true; });
41-
var extractPath = unzipTask.RunSynchronously();
41+
unzipTask.RunSynchronously();
42+
4243
if (unzipTask.Successful)
4344
path = MoveOctorun(extractPath.Combine("octorun"));
4445
return path;

0 commit comments

Comments
 (0)