Skip to content

Commit

Permalink
Fixup the mechanism used to determine current assembly folder
Browse files Browse the repository at this point in the history
  • Loading branch information
davewalker5 committed Apr 11, 2023
1 parent 3af4ba4 commit 8de5cb4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/TelloCommander/CommandDictionaries/CommandDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,7 @@ private static string GetVersionFromFilename(string filename)
private static string GetAssemblyLocation()
{
string codeBase = Assembly.GetExecutingAssembly().Location;
UriBuilder builder = new UriBuilder(codeBase);
string location = Path.GetDirectoryName(Uri.UnescapeDataString(builder.Path));
string location = Path.GetDirectoryName(codeBase);
return location;
}

Expand Down
3 changes: 1 addition & 2 deletions src/TelloCommander/Commander/DroneCommander.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,7 @@ private string GetFullScriptPath(string file)
{
// Get the folder containing the current assembly
string codeBase = Assembly.GetExecutingAssembly().Location;
UriBuilder builder = new UriBuilder(codeBase);
string folder = Path.GetDirectoryName(Uri.UnescapeDataString(builder.Path));
string folder = Path.GetDirectoryName(codeBase);

// Combine with the specified file to give the full path
fullPath = Path.Combine(folder, file);
Expand Down
4 changes: 2 additions & 2 deletions src/TelloCommander/TelloCommander.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<PackageId>TelloCommander</PackageId>
<ReleaseVersion>1.0.0.7</ReleaseVersion>
<PackageVersion>1.0.0.7</PackageVersion>
<ReleaseVersion>1.0.0.8</ReleaseVersion>
<PackageVersion>1.0.0.8</PackageVersion>
<Authors>Dave Walker</Authors>
<Copyright>Copyright (c) 2020, 2021, 2023 Dave Walker</Copyright>
<Owners>Dave Walker</Owners>
Expand Down

0 comments on commit 8de5cb4

Please sign in to comment.