File tree Expand file tree Collapse file tree 2 files changed +8
-18
lines changed
src/Files.App/Filesystem/StorageItems Expand file tree Collapse file tree 2 files changed +8
-18
lines changed Original file line number Diff line number Diff line change @@ -70,17 +70,12 @@ public ShellStorageFile(ShellFileItem item)
70
70
public static ShellStorageFile FromShellItem ( ShellFileItem item )
71
71
{
72
72
if ( item is ShellLinkItem linkItem )
73
- {
74
73
return new ShortcutStorageFile ( linkItem ) ;
75
- }
76
- else if ( item . RecyclePath . Contains ( "$Recycle.Bin" , StringComparison . Ordinal ) )
77
- {
74
+
75
+ if ( item . RecyclePath . Contains ( "$Recycle.Bin" , StringComparison . OrdinalIgnoreCase ) )
78
76
return new BinStorageFile ( item ) ;
79
- }
80
- else
81
- {
82
- return new ShellStorageFile ( item ) ;
83
- }
77
+
78
+ return new ShellStorageFile ( item ) ;
84
79
}
85
80
86
81
public static IAsyncOperation < BaseStorageFile > FromPathAsync ( string path )
Original file line number Diff line number Diff line change @@ -85,17 +85,12 @@ public static bool IsShellPath(string path)
85
85
public static ShellStorageFolder FromShellItem ( ShellFileItem item )
86
86
{
87
87
if ( item is ShellLinkItem linkItem )
88
- {
89
88
return new ShortcutStorageFolder ( linkItem ) ;
90
- }
91
- else if ( item . RecyclePath . Contains ( "$Recycle.Bin" , StringComparison . Ordinal ) )
92
- {
89
+
90
+ if ( item . RecyclePath . Contains ( "$Recycle.Bin" , StringComparison . OrdinalIgnoreCase ) )
93
91
return new BinStorageFolder ( item ) ;
94
- }
95
- else
96
- {
97
- return new ShellStorageFolder ( item ) ;
98
- }
92
+
93
+ return new ShellStorageFolder ( item ) ;
99
94
}
100
95
101
96
public static IAsyncOperation < BaseStorageFolder > FromPathAsync ( string path )
You can’t perform that action at this time.
0 commit comments