Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/shell icons path extension #65

Merged
merged 3 commits into from
Nov 2, 2023

Conversation

iksi4prs
Copy link
Contributor

fixed shell icons, which didn't work because IPathService and System.IO.Path return different values for GetExtension

@codecov-commenter
Copy link

codecov-commenter commented Oct 29, 2023

Codecov Report

Attention: 13 lines in your changes are missing coverage. Please review.

Comparison is base (fee69f6) 92.89% compared to head (2886257) 92.89%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #65   +/-   ##
=======================================
  Coverage   92.89%   92.89%           
=======================================
  Files         185      185           
  Lines        4830     4830           
  Branches      388      388           
=======================================
  Hits         4487     4487           
  Misses        288      288           
  Partials       55       55           
Files Coverage Δ
src/Camelot.Services/PathService.cs 96.87% <ø> (ø)
...els.Windows/ShellIcons/WindowsShellLinksService.cs 0.00% <0.00%> (ø)
....ViewModels.Windows/ShellIcons/WindowsIconTypes.cs 0.00% <0.00%> (ø)
...els.Windows/ShellIcons/WindowsShellIconsService.cs 0.00% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -23,19 +23,14 @@ public class WindowsShellIconsService : IShellIconsService

public ImageModel GetIconForExtension(string extension)
{
if (string.IsNullOrEmpty(extension))
if (!_pathService.IsExtension(extension))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this check and the corresponding method in IPathService. Project standard is to avoid redundant checks especially given that extension is following the same standards across the codebase. Also IsExtension doesn't have too much value

{
throw new ArgumentNullException(nameof(extension));
}
if (extension.StartsWith("."))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this check as well

@IngvarX IngvarX merged commit 3330b67 into IngvarX:master Nov 2, 2023
3 checks passed
@iksi4prs iksi4prs deleted the bugfix/shell-icons-path-extension branch December 19, 2023 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants