@@ -140,7 +140,8 @@ public async Task<IStorageHistory> CopyItemsAsync(IList<IStorageItemWithPath> so
140
140
var copiedSources = copyResult . Items . Where ( x => x . Succeeded && x . Destination != null && x . Source != x . Destination ) ;
141
141
if ( copiedSources . Any ( ) )
142
142
{
143
- var sourceMatch = await copiedSources . Select ( x => sourceRename . SingleOrDefault ( s => s . Path == x . Source ) ) . Where ( x => x != null ) . ToListAsync ( ) ;
143
+ var sourceMatch = await copiedSources . Select ( x => sourceRename
144
+ . SingleOrDefault ( s => s . Path . Equals ( x . Source , StringComparison . OrdinalIgnoreCase ) ) ) . Where ( x => x != null ) . ToListAsync ( ) ;
144
145
return new StorageHistory ( FileOperationType . Copy ,
145
146
sourceMatch ,
146
147
await copiedSources . Zip ( sourceMatch , ( rSrc , oSrc ) => new { rSrc , oSrc } )
@@ -363,7 +364,8 @@ public async Task<IStorageHistory> DeleteItemsAsync(IList<IStorageItemWithPath>
363
364
var recycledSources = deleteResult . Items . Where ( x => x . Succeeded && x . Destination != null && x . Source != x . Destination ) ;
364
365
if ( recycledSources . Any ( ) )
365
366
{
366
- var sourceMatch = await recycledSources . Select ( x => source . DistinctBy ( x => x . Path ) . SingleOrDefault ( s => s . Path == x . Source ) ) . Where ( x => x != null ) . ToListAsync ( ) ;
367
+ var sourceMatch = await recycledSources . Select ( x => source . DistinctBy ( x => x . Path )
368
+ . SingleOrDefault ( s => s . Path . Equals ( x . Source , StringComparison . OrdinalIgnoreCase ) ) ) . Where ( x => x != null ) . ToListAsync ( ) ;
367
369
return new StorageHistory ( FileOperationType . Recycle ,
368
370
sourceMatch ,
369
371
await recycledSources . Zip ( sourceMatch , ( rSrc , oSrc ) => new { rSrc , oSrc } )
@@ -480,7 +482,8 @@ public async Task<IStorageHistory> MoveItemsAsync(IList<IStorageItemWithPath> so
480
482
var movedSources = moveResult . Items . Where ( x => x . Succeeded && x . Destination != null && x . Source != x . Destination ) ;
481
483
if ( movedSources . Any ( ) )
482
484
{
483
- var sourceMatch = await movedSources . Select ( x => sourceRename . SingleOrDefault ( s => s . Path == x . Source ) ) . Where ( x => x != null ) . ToListAsync ( ) ;
485
+ var sourceMatch = await movedSources . Select ( x => sourceRename
486
+ . SingleOrDefault ( s => s . Path . Equals ( x . Source , StringComparison . OrdinalIgnoreCase ) ) ) . Where ( x => x != null ) . ToListAsync ( ) ;
484
487
return new StorageHistory ( FileOperationType . Move ,
485
488
sourceMatch ,
486
489
await movedSources . Zip ( sourceMatch , ( rSrc , oSrc ) => new { rSrc , oSrc } )
@@ -619,7 +622,8 @@ public async Task<IStorageHistory> RestoreItemsFromTrashAsync(IList<IStorageItem
619
622
var movedSources = moveResult . Items . Where ( x => x . Succeeded && x . Destination != null && x . Source != x . Destination ) ;
620
623
if ( movedSources . Any ( ) )
621
624
{
622
- var sourceMatch = await movedSources . Select ( x => source . SingleOrDefault ( s => s . Path == x . Source ) ) . Where ( x => x != null ) . ToListAsync ( ) ;
625
+ var sourceMatch = await movedSources . Select ( x => source
626
+ . SingleOrDefault ( s => s . Path . Equals ( x . Source , StringComparison . OrdinalIgnoreCase ) ) ) . Where ( x => x != null ) . ToListAsync ( ) ;
623
627
// Recycle bin also stores a file starting with $I for each item
624
628
await DeleteItemsAsync ( await movedSources . Zip ( sourceMatch , ( rSrc , oSrc ) => new { rSrc , oSrc } )
625
629
. Select ( src => StorageHelpers . FromPathAndType (
0 commit comments