-
Notifications
You must be signed in to change notification settings - Fork 45
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
Bugfix/shell icons path extension #65
Conversation
….IO.Path return different values for GetExtension
Codecov ReportAttention:
❗ 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
☔ View full report in Codecov by Sentry. |
@@ -23,19 +23,14 @@ public class WindowsShellIconsService : IShellIconsService | |||
|
|||
public ImageModel GetIconForExtension(string extension) | |||
{ | |||
if (string.IsNullOrEmpty(extension)) | |||
if (!_pathService.IsExtension(extension)) |
There was a problem hiding this comment.
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(".")) |
There was a problem hiding this comment.
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
fixed shell icons, which didn't work because IPathService and System.IO.Path return different values for GetExtension