mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
[Peek]Fix preview for folders with dot in the name(#32085)
This commit is contained in:
committed by
GitHub
parent
0110d7d244
commit
0a316370d8
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user