[Peek]Fix preview for folders with dot in the name(#32085)

This commit is contained in:
Davide Giacometti
2024-03-26 17:50:08 +01:00
committed by GitHub
parent 0110d7d244
commit 0a316370d8
20 changed files with 60 additions and 45 deletions

View File

@@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information.
using System;
using System.Globalization;
using System.Threading.Tasks;
using ManagedCommon;
using Windows.Storage;
@@ -25,6 +26,8 @@ namespace Peek.Common.Models
public string Path { get; init; }
public string Extension => System.IO.Path.GetExtension(Path).ToLower(CultureInfo.InvariantCulture);
public async Task<IStorageItem?> GetStorageItemAsync()
{
return await GetStorageFileAsync();

View File

@@ -25,6 +25,8 @@ namespace Peek.Common.Models
public string Path { get; init; }
public string Extension => string.Empty;
public async Task<IStorageItem?> GetStorageItemAsync()
{
return await GetStorageFolderAsync();

View File

@@ -3,7 +3,6 @@
// See the LICENSE file in the project root for more information.
using System;
using System.Globalization;
using System.Threading.Tasks;
using Peek.Common.Helpers;
using Windows.Storage;
@@ -32,7 +31,7 @@ namespace Peek.Common.Models
}
}
public string Extension => System.IO.Path.GetExtension(Path).ToLower(CultureInfo.InvariantCulture);
public string Extension { get; }
public string Name { get; init; }