Skip to content

Commit

Permalink
startup fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanexhoax committed Sep 14, 2024
1 parent b488421 commit d091a6a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion WinTool/CommandLine/CreateFileParameter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public override string ToString()
StringBuilder sb = new(ParameterName);

if (FilePath is not (null or []))
sb.Append($" {PathSubParameter}={FilePath}");
sb.Append($" {PathSubParameter}=\"{FilePath}\"");
if (Size > 0)
sb.Append($" {SizeSubParameter}={Size}");

Expand Down
2 changes: 1 addition & 1 deletion WinTool/Utils/ProcessHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ static ProcessHelper()
var principal = new WindowsPrincipal(identity);
_isAdmin = principal.IsInRole(WindowsBuiltInRole.Administrator);

_appDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!;
_appDirectory = Path.GetDirectoryName(Environment.ProcessPath)!;
ProcessPath = Path.Combine(_appDirectory, "WinTool.exe");
}

Expand Down
5 changes: 1 addition & 4 deletions WinTool/WinTool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<PackageProjectUrl>https://github.com/arcanexhoax/WinTool</PackageProjectUrl>
<Description>WinTool is a utility that expands shortcuts for Windows Explorer, it adds shortcuts for useful functions that do not have it.</Description>
<ApplicationIcon>Resources\icon.ico</ApplicationIcon>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -39,10 +40,6 @@
</COMReference>
</ItemGroup>

<ItemGroup>
<Content Include="Resources\icon.ico" />
</ItemGroup>

<ItemGroup>
<Resource Include="Resources\icon.ico" />
<Resource Include="Resources\logo.png" />
Expand Down

0 comments on commit d091a6a

Please sign in to comment.