Skip to content

Commit 161f92e

Browse files
authored
Merge branch 'main' into include-primitives
Signed-off-by: Lamparter <[email protected]>
2 parents d856ebd + 005ebd4 commit 161f92e

File tree

15 files changed

+38
-37
lines changed

15 files changed

+38
-37
lines changed

Directory.Build.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
<TargetWindowsVersion>10.0.22621.0</TargetWindowsVersion>
66
<MinimalWindowsVersion>10.0.19041.0</MinimalWindowsVersion>
77
<WindowsSdkPackageVersion>10.0.22621.57</WindowsSdkPackageVersion>
8+
<WindowsTargetFramework>$(TargetFrameworkVersion)-windows$(TargetWindowsVersion)</WindowsTargetFramework>
89
</PropertyGroup>
910
<ItemGroup>
1011
<None Include="$(MSBuildThisFileDirectory)\.editorconfig" />
1112
<None Include="$(MSBuildThisFileDirectory)\Directory.Build.props" />
1213
<None Include="$(MSBuildThisFileDirectory)\Directory.Packages.props" />
1314
</ItemGroup>
14-
</Project>
15+
</Project>

src/Files.App.BackgroundTasks/Files.App.BackgroundTasks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33

44
<PropertyGroup>
5-
<TargetFramework>$(TargetFrameworkVersion)-windows$(TargetWindowsVersion)</TargetFramework>
5+
<TargetFramework>$(WindowsTargetFramework)</TargetFramework>
66
<DefaultLanguage>en-US</DefaultLanguage>
77
<TargetPlatformMinVersion>$(MinimalWindowsVersion)</TargetPlatformMinVersion>
88
<IsTrimmable>true</IsTrimmable>

src/Files.App.Controls/Files.App.Controls.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33

44
<PropertyGroup>
5-
<TargetFramework>$(TargetFrameworkVersion)-windows$(TargetWindowsVersion)</TargetFramework>
5+
<TargetFramework>$(WindowsTargetFramework)</TargetFramework>
66
<TargetPlatformMinVersion>$(MinimalWindowsVersion)</TargetPlatformMinVersion>
77
<UseWinUI>true</UseWinUI>
88
<Nullable>enable</Nullable>

src/Files.App.CsWin32/Files.App.CsWin32.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33

44
<PropertyGroup>
5-
<TargetFramework>$(TargetFrameworkVersion)-windows$(TargetWindowsVersion)</TargetFramework>
5+
<TargetFramework>$(WindowsTargetFramework)</TargetFramework>
66
<TargetPlatformMinVersion>$(MinimalWindowsVersion)</TargetPlatformMinVersion>
77
<Nullable>enable</Nullable>
88
<IsTrimmable>true</IsTrimmable>

src/Files.App.Server/Files.App.Server.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<DefaultLanguage>en-US</DefaultLanguage>
77
<AppxBundleAutoResourcePackageQualifiers>Scale|DXFeatureLevel</AppxBundleAutoResourcePackageQualifiers>
88
<AppxDefaultResourceQualifiers>Language=en-US;af;ar;be-BY;bg;ca;cs-CZ;da;de-DE;el;en-GB;es-ES;es-419;fa-IR;fi-FI;fil-PH;fr-FR;he-IL;hi-IN;hr-HR;hu-HU;id-ID;it-IT;ja-JP;ka;km-KH;ko-KR;lt-LT;lv-LV;ms-MY;nb-NO;nl-NL;pl-PL;pt-BR;pt-PT;ro-RO;ru-RU;sk-SK;sq-AL;sr-Cyrl;sv-SE;ta;th-TH;tr-TR;uk-UA;vi;zh-Hans;zh-Hant</AppxDefaultResourceQualifiers>
9-
<TargetFramework>$(TargetFrameworkVersion)-windows$(TargetWindowsVersion)</TargetFramework>
9+
<TargetFramework>$(WindowsTargetFramework)</TargetFramework>
1010
<TargetPlatformMinVersion>$(MinimalWindowsVersion)</TargetPlatformMinVersion>
1111
<ImplicitUsings>enable</ImplicitUsings>
1212
<Nullable>enable</Nullable>

src/Files.App.Storage/Files.App.Storage.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33

44
<PropertyGroup>
5-
<TargetFramework>$(TargetFrameworkVersion)-windows$(TargetWindowsVersion)</TargetFramework>
5+
<TargetFramework>$(WindowsTargetFramework)</TargetFramework>
66
<TargetPlatformMinVersion>$(MinimalWindowsVersion)</TargetPlatformMinVersion>
77
<Nullable>enable</Nullable>
88
<IsTrimmable>true</IsTrimmable>

src/Files.App/Data/Items/WidgetFileTagsContainerItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public WidgetFileTagsContainerItem(string tagUid)
5959
/// <inheritdoc/>
6060
public async Task InitAsync(CancellationToken cancellationToken = default)
6161
{
62-
await foreach (var item in FileTagsService.GetItemsForTagAsync(_tagUid))
62+
await foreach (var item in FileTagsService.GetItemsForTagAsync(_tagUid, cancellationToken))
6363
{
6464
var icon = await ImageService.GetIconAsync(item.Storable, default);
6565
Tags.Add(new(item.Storable, icon));

src/Files.App/Files.App.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33

44
<PropertyGroup>
5-
<TargetFramework>$(TargetFrameworkVersion)-windows$(TargetWindowsVersion)</TargetFramework>
5+
<TargetFramework>$(WindowsTargetFramework)</TargetFramework>
66
<OutputType>WinExe</OutputType>
77
<AssemblyName>Files</AssemblyName>
88
<DefaultLanguage>en-US</DefaultLanguage>

src/Files.App/Utils/Storage/Operations/FilesystemOperations.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ await DialogDisplayHelper.ShowDialogAsync(
166166
{
167167
// CopyFileFromApp only works on file not directories
168168
var fsSourceFolder = await source.ToStorageItemResult();
169-
var fsDestinationFolder = await _associatedInstance.ShellViewModel.GetFolderFromPathAsync(PathNormalization.GetParentDir(destination));
169+
var fsDestinationFolder = await _associatedInstance.ShellViewModel.GetFolderFromPathAsync(PathNormalization.GetParentDir(destination), cancellationToken);
170170
var fsResult = (FilesystemResult)(fsSourceFolder.ErrorCode | fsDestinationFolder.ErrorCode);
171171

172172
if (fsResult)
@@ -219,7 +219,7 @@ await DialogDisplayHelper.ShowDialogAsync(
219219
{
220220
Debug.WriteLine(System.Runtime.InteropServices.Marshal.GetLastWin32Error());
221221

222-
FilesystemResult<BaseStorageFolder> destinationResult = await _associatedInstance.ShellViewModel.GetFolderFromPathAsync(PathNormalization.GetParentDir(destination));
222+
FilesystemResult<BaseStorageFolder> destinationResult = await _associatedInstance.ShellViewModel.GetFolderFromPathAsync(PathNormalization.GetParentDir(destination), cancellationToken);
223223
var sourceResult = await source.ToStorageItemResult();
224224
fsResult = sourceResult.ErrorCode | destinationResult.ErrorCode;
225225

@@ -373,7 +373,7 @@ await DialogDisplayHelper.ShowDialogAsync(
373373
Debug.WriteLine(System.Runtime.InteropServices.Marshal.GetLastWin32Error());
374374

375375
var fsSourceFolder = await source.ToStorageItemResult();
376-
var fsDestinationFolder = await _associatedInstance.ShellViewModel.GetFolderFromPathAsync(PathNormalization.GetParentDir(destination));
376+
var fsDestinationFolder = await _associatedInstance.ShellViewModel.GetFolderFromPathAsync(PathNormalization.GetParentDir(destination), cancellationToken);
377377
fsResult = fsSourceFolder.ErrorCode | fsDestinationFolder.ErrorCode;
378378

379379
if (fsResult)
@@ -432,7 +432,7 @@ await DialogDisplayHelper.ShowDialogAsync(
432432
{
433433
Debug.WriteLine(System.Runtime.InteropServices.Marshal.GetLastWin32Error());
434434

435-
FilesystemResult<BaseStorageFolder> destinationResult = await _associatedInstance.ShellViewModel.GetFolderFromPathAsync(PathNormalization.GetParentDir(destination));
435+
FilesystemResult<BaseStorageFolder> destinationResult = await _associatedInstance.ShellViewModel.GetFolderFromPathAsync(PathNormalization.GetParentDir(destination), cancellationToken);
436436
var sourceResult = await source.ToStorageItemResult();
437437
fsResult = sourceResult.ErrorCode | destinationResult.ErrorCode;
438438

@@ -512,12 +512,12 @@ public async Task<IStorageHistory> DeleteAsync(IStorageItemWithPath source, IPro
512512
{
513513
if (source.ItemType == FilesystemItemType.File)
514514
{
515-
fsResult = await _associatedInstance.ShellViewModel.GetFileFromPathAsync(source.Path)
515+
fsResult = await _associatedInstance.ShellViewModel.GetFileFromPathAsync(source.Path, cancellationToken)
516516
.OnSuccess((t) => t.DeleteAsync(permanently ? StorageDeleteOption.PermanentDelete : StorageDeleteOption.Default).AsTask());
517517
}
518518
else if (source.ItemType == FilesystemItemType.Directory)
519519
{
520-
fsResult = await _associatedInstance.ShellViewModel.GetFolderFromPathAsync(source.Path)
520+
fsResult = await _associatedInstance.ShellViewModel.GetFolderFromPathAsync(source.Path, cancellationToken)
521521
.OnSuccess((t) => t.DeleteAsync(permanently ? StorageDeleteOption.PermanentDelete : StorageDeleteOption.Default).AsTask());
522522
}
523523
}
@@ -539,7 +539,7 @@ public async Task<IStorageHistory> DeleteAsync(IStorageItemWithPath source, IPro
539539
// Recycle bin also stores a file starting with $I for each item
540540
string iFilePath = Path.Combine(Path.GetDirectoryName(source.Path), Path.GetFileName(source.Path).Replace("$R", "$I", StringComparison.Ordinal));
541541

542-
await _associatedInstance.ShellViewModel.GetFileFromPathAsync(iFilePath)
542+
await _associatedInstance.ShellViewModel.GetFileFromPathAsync(iFilePath, cancellationToken)
543543
.OnSuccess(iFile => iFile.DeleteAsync(StorageDeleteOption.PermanentDelete).AsTask());
544544
}
545545
fsProgress.ReportStatus(fsResult);
@@ -738,8 +738,8 @@ public async Task<IStorageHistory> RestoreFromTrashAsync(IStorageItemWithPath so
738738
{
739739
if (source.ItemType == FilesystemItemType.Directory)
740740
{
741-
FilesystemResult<BaseStorageFolder> sourceFolder = await _associatedInstance.ShellViewModel.GetFolderFromPathAsync(source.Path);
742-
FilesystemResult<BaseStorageFolder> destinationFolder = await _associatedInstance.ShellViewModel.GetFolderFromPathAsync(PathNormalization.GetParentDir(destination));
741+
FilesystemResult<BaseStorageFolder> sourceFolder = await _associatedInstance.ShellViewModel.GetFolderFromPathAsync(source.Path, cancellationToken);
742+
FilesystemResult<BaseStorageFolder> destinationFolder = await _associatedInstance.ShellViewModel.GetFolderFromPathAsync(PathNormalization.GetParentDir(destination), cancellationToken);
743743

744744
fsResult = sourceFolder.ErrorCode | destinationFolder.ErrorCode;
745745
fsProgress.ReportStatus(fsResult);
@@ -759,8 +759,8 @@ public async Task<IStorageHistory> RestoreFromTrashAsync(IStorageItemWithPath so
759759
}
760760
else
761761
{
762-
FilesystemResult<BaseStorageFile> sourceFile = await _associatedInstance.ShellViewModel.GetFileFromPathAsync(source.Path);
763-
FilesystemResult<BaseStorageFolder> destinationFolder = await _associatedInstance.ShellViewModel.GetFolderFromPathAsync(PathNormalization.GetParentDir(destination));
762+
FilesystemResult<BaseStorageFile> sourceFile = await _associatedInstance.ShellViewModel.GetFileFromPathAsync(source.Path, cancellationToken);
763+
FilesystemResult<BaseStorageFolder> destinationFolder = await _associatedInstance.ShellViewModel.GetFolderFromPathAsync(PathNormalization.GetParentDir(destination), cancellationToken);
764764

765765
fsResult = sourceFile.ErrorCode | destinationFolder.ErrorCode;
766766
fsProgress.ReportStatus(fsResult);
@@ -782,7 +782,7 @@ public async Task<IStorageHistory> RestoreFromTrashAsync(IStorageItemWithPath so
782782
// Recycle bin also stores a file starting with $I for each item
783783
string iFilePath = Path.Combine(Path.GetDirectoryName(source.Path), Path.GetFileName(source.Path).Replace("$R", "$I", StringComparison.Ordinal));
784784

785-
await _associatedInstance.ShellViewModel.GetFileFromPathAsync(iFilePath)
785+
await _associatedInstance.ShellViewModel.GetFileFromPathAsync(iFilePath, cancellationToken)
786786
.OnSuccess(iFile => iFile.DeleteAsync(StorageDeleteOption.PermanentDelete).AsTask());
787787
}
788788

src/Files.App/Utils/Storage/Search/FolderSearch.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ await Task.Run(() =>
336336
} while (hasNextFile);
337337

338338
Win32PInvoke.FindClose(hFile);
339-
});
339+
}, token);
340340
}
341341
}
342342

0 commit comments

Comments
 (0)