From 63db623d0701f0db65fd3ff43f2c8aba1a79850d Mon Sep 17 00:00:00 2001 From: stax76 Date: Fri, 11 Mar 2022 22:02:54 +0100 Subject: [PATCH] 2 fixes --- docs/Changelog.md | 3 +- .../RatingExtension/RatingExtension.csproj | 10 +++--- src/Misc/ExtensionMethods.cs | 20 +++++++++--- src/Package/mpv.net.package.wapproj | 12 +++---- src/mpv.net.csproj | 13 +++----- src/mpv.net.sln | 32 +++++++++---------- 6 files changed, 50 insertions(+), 40 deletions(-) diff --git a/docs/Changelog.md b/docs/Changelog.md index 68d0e8c..b6a66f8 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -1,6 +1,7 @@ - Fix showing incorrect timestamps in About dialog of Store version. -- MS Store page no longer displays ARM and x86 support. +- Fix Store page showing non existant ARM and x86 support. +- Fix opening zip files. 5.7.0.0 Stable (2022-03-09) diff --git a/src/Extensions/RatingExtension/RatingExtension.csproj b/src/Extensions/RatingExtension/RatingExtension.csproj index 3299d6d..6c0af2c 100644 --- a/src/Extensions/RatingExtension/RatingExtension.csproj +++ b/src/Extensions/RatingExtension/RatingExtension.csproj @@ -13,22 +13,22 @@ 512 - + true bin\ DEBUG;TRACE full - AnyCPU + x64 7.3 prompt MinimumRecommendedRules.ruleset - - bin\ + + bin\x64\Release\ TRACE true pdbonly - AnyCPU + x64 7.3 prompt MinimumRecommendedRules.ruleset diff --git a/src/Misc/ExtensionMethods.cs b/src/Misc/ExtensionMethods.cs index 023734b..6220b79 100644 --- a/src/Misc/ExtensionMethods.cs +++ b/src/Misc/ExtensionMethods.cs @@ -68,13 +68,25 @@ public static class ConvertStringExtension public static class PathStringExtension { - // returns the extension with lower case and without preceding dot. - public static string Ext(this string instance) + public static string Ext(this string filepath) => Ext(filepath, false); + + public static string Ext(this string filepath, bool includeDot) { - if (instance == null) + if (string.IsNullOrEmpty(filepath)) return ""; - return Path.GetExtension(instance).TrimStart('.').ToLower(); + char[] chars = filepath.ToCharArray(); + + for (int x = filepath.Length - 1; x >= 0; x--) + { + if (chars[x] == Path.DirectorySeparatorChar) + return ""; + + if (chars[x] == '.') + return filepath.Substring(x + (includeDot ? 0 : 1)).ToLowerInvariant(); + } + + return ""; } public static string FileName(this string instance) diff --git a/src/Package/mpv.net.package.wapproj b/src/Package/mpv.net.package.wapproj index 00b727c..cf1eaf1 100644 --- a/src/Package/mpv.net.package.wapproj +++ b/src/Package/mpv.net.package.wapproj @@ -4,13 +4,13 @@ 15.0 - + Debug - AnyCPU + x64 - + Release - AnyCPU + x64 @@ -31,10 +31,10 @@ True 0 - + Always - + Always diff --git a/src/mpv.net.csproj b/src/mpv.net.csproj index 9090f19..b644d6f 100644 --- a/src/mpv.net.csproj +++ b/src/mpv.net.csproj @@ -48,28 +48,25 @@ app.manifest - + true bin\ DEBUG;TRACE full - AnyCPU + x64 7.3 prompt MinimumRecommendedRules.ruleset - false - false - - bin\ + + bin\x64\Release\ TRACE true pdbonly - AnyCPU + x64 7.3 prompt MinimumRecommendedRules.ruleset - false diff --git a/src/mpv.net.sln b/src/mpv.net.sln index 534f62d..8aab217 100644 --- a/src/mpv.net.sln +++ b/src/mpv.net.sln @@ -16,24 +16,24 @@ Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "mpv.net.package", "Package\ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|Any CPU.Build.0 = Release|Any CPU - {55C88710-539D-4402-84C8-31694841C731}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {55C88710-539D-4402-84C8-31694841C731}.Debug|Any CPU.Build.0 = Debug|Any CPU - {55C88710-539D-4402-84C8-31694841C731}.Release|Any CPU.ActiveCfg = Release|Any CPU - {55C88710-539D-4402-84C8-31694841C731}.Release|Any CPU.Build.0 = Release|Any CPU - {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|Any CPU.Build.0 = Release|Any CPU - {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|Any CPU.Deploy.0 = Release|Any CPU + {1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|x64.ActiveCfg = Debug|x64 + {1751F378-8EDF-4B62-BE6D-304C7C287089}.Debug|x64.Build.0 = Debug|x64 + {1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|x64.ActiveCfg = Release|x64 + {1751F378-8EDF-4B62-BE6D-304C7C287089}.Release|x64.Build.0 = Release|x64 + {55C88710-539D-4402-84C8-31694841C731}.Debug|x64.ActiveCfg = Debug|x64 + {55C88710-539D-4402-84C8-31694841C731}.Debug|x64.Build.0 = Debug|x64 + {55C88710-539D-4402-84C8-31694841C731}.Release|x64.ActiveCfg = Release|x64 + {55C88710-539D-4402-84C8-31694841C731}.Release|x64.Build.0 = Release|x64 + {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|x64.ActiveCfg = Debug|x64 + {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|x64.Build.0 = Debug|x64 + {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Debug|x64.Deploy.0 = Debug|x64 + {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|x64.ActiveCfg = Release|x64 + {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|x64.Build.0 = Release|x64 + {81DAEE3A-76FF-4494-9384-D28A651D70BB}.Release|x64.Deploy.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE