Skip to content

Commit

Permalink
Fix opts.BaseUrl null ref (App Cast Gen)
Browse files Browse the repository at this point in the history
Fixes #173
  • Loading branch information
Deadpikle committed Mar 21, 2021
1 parent d00804c commit acd1c73
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,18 @@
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent />
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<FileVersion>2.0.0.0</FileVersion>
<AssemblyVersion>2.0.1.0</AssemblyVersion>
<FileVersion>2.0.1.0</FileVersion>
<PackageId>NetSparkleUpdater.Tools.AppCastGenerator</PackageId>
<Version>2.0.0</Version>
<Version>2.0.1</Version>
<Authors>Deadpikle</Authors>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
<PackageProjectUrl>https://github.com/NetSparkleUpdater/NetSparkle</PackageProjectUrl>
<PackageIcon>software-update-available.png</PackageIcon>
<RepositoryUrl>https://github.com/NetSparkleUpdater/NetSparkle.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>sparkle, netsparkle, update, software, updater, appcast, generate, software, app cast</PackageTags>
<PackageReleaseNotes>2.0.0: See https://github.com/NetSparkleUpdater/NetSparkle for all release information and to file issues/pull requests for this project.</PackageReleaseNotes>
<PackageReleaseNotes>2.0.1: See https://github.com/NetSparkleUpdater/NetSparkle for all release information and to file issues/pull requests for this project.</PackageReleaseNotes>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/NetSparkle.Tools.AppCastGenerator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,9 @@ static void Run(Options opts)
var itemTitle = string.IsNullOrWhiteSpace(productName) ? productVersion : productName + " " + productVersion;

var urlEncodedFileName = HttpUtility.UrlEncode(fileInfo.Name);
var urlToUse = opts.BaseUrl.ToString().EndsWith("/")
? opts.BaseUrl.ToString()
: opts.BaseUrl + "/";
var urlToUse = !string.IsNullOrWhiteSpace(opts.BaseUrl?.ToString())
? (opts.BaseUrl.ToString().EndsWith("/") ? opts.BaseUrl.ToString() : opts.BaseUrl + "/")
: "";
if (opts.PrefixVersion)
{
urlToUse += $"{version}/";
Expand Down

0 comments on commit acd1c73

Please sign in to comment.