diff --git a/BITS/BackgroundCopyJob.cs b/BITS/BackgroundCopyJob.cs index d4773887..66c890b9 100644 --- a/BITS/BackgroundCopyJob.cs +++ b/BITS/BackgroundCopyJob.cs @@ -307,7 +307,7 @@ namespace Vanara.IO /// be set before the first call to IBackgroundCopyJob::Resume that starts the job. /// /// - [DefaultValue(null)] + [DefaultValue("GET")] public string HttpMethod { get => RunAction(() => IHttpOp2.GetHttpMethod()); diff --git a/BITS/BackgroundCopyManager.cs b/BITS/BackgroundCopyManager.cs index 7cecf918..cfcdda9f 100644 --- a/BITS/BackgroundCopyManager.cs +++ b/BITS/BackgroundCopyManager.cs @@ -31,7 +31,7 @@ namespace Vanara.IO static Version GetVer() { - var fi = System.Diagnostics.FileVersionInfo.GetVersionInfo(System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "qmgr.dll")); + var fi = System.Diagnostics.FileVersionInfo.GetVersionInfo(Environment.ExpandEnvironmentVariables(@"%WinDir%\sysnative\qmgr.dll")); return $"{fi.FileMajorPart}.{fi.FileMinorPart}" switch { "7.8" when fi.FileBuildPart >= 18362 => new Version(10, 3), diff --git a/UnitTests/BITS/JobPropTest.cs b/UnitTests/BITS/JobPropTest.cs index e4d9c33e..3bdbe1eb 100644 --- a/UnitTests/BITS/JobPropTest.cs +++ b/UnitTests/BITS/JobPropTest.cs @@ -50,6 +50,9 @@ namespace Vanara.IO.Tests Assert.That(() => job.HighPerformance = true, Throws.Nothing); Assert.That(job.HighPerformance, Is.EqualTo(true)); + Assert.That(job.HttpMethod, Is.EqualTo(job.GetDefVal(nameof(job.HttpMethod)))); + Assert.That(() => job.MakeCustomHeadersWriteOnly(), Throws.Nothing); + Assert.That(job.ID, Is.Not.EqualTo(Guid.Empty)); Assert.That(job.JobType, Is.EqualTo(BackgroundCopyJobType.Download)); @@ -90,7 +93,6 @@ namespace Vanara.IO.Tests Assert.That(() => job.OnDemand = true, Throws.Nothing); Assert.That(job.OnDemand, Is.EqualTo(true)); - using var identity = WindowsIdentity.GetCurrent(); Assert.That(job.Owner, Is.EqualTo(identity.User));