File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed
Files/View Models/Properties Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -94,20 +94,10 @@ public async override void GetSpecialProperties()
94
94
}
95
95
}
96
96
97
- var parentDirectory = AppInstance . FilesystemViewModel . CurrentFolder ;
98
-
99
- StorageFolder storageFolder = null ;
97
+ StorageFolder storageFolder ;
100
98
try
101
99
{
102
- var isItemSelected = await CoreApplication . MainView . ExecuteOnUIThreadAsync ( ( ) => AppInstance ? . ContentPage ? . IsItemSelected ?? true ) ;
103
- if ( isItemSelected )
104
- {
105
- storageFolder = await AppInstance . FilesystemViewModel . GetFolderFromPathAsync ( ( Item as ShortcutItem ) ? . TargetPath ?? Item . ItemPath ) ;
106
- }
107
- else if ( ! parentDirectory . ItemPath . StartsWith ( App . AppSettings . RecycleBinPath ) )
108
- {
109
- storageFolder = await AppInstance . FilesystemViewModel . GetFolderFromPathAsync ( parentDirectory . ItemPath ) ;
110
- }
100
+ storageFolder = await AppInstance . FilesystemViewModel . GetFolderFromPathAsync ( ( Item as ShortcutItem ) ? . TargetPath ?? Item . ItemPath ) ;
111
101
}
112
102
catch ( Exception ex )
113
103
{
@@ -124,7 +114,7 @@ public async override void GetSpecialProperties()
124
114
GetOtherProperties ( storageFolder . Properties ) ;
125
115
GetFolderSize ( storageFolder , TokenSource . Token ) ;
126
116
}
127
- else if ( parentDirectory . ItemPath . StartsWith ( App . AppSettings . RecycleBinPath ) )
117
+ else if ( Item . ItemPath . Equals ( App . AppSettings . RecycleBinPath , StringComparison . OrdinalIgnoreCase ) )
128
118
{
129
119
// GetFolderFromPathAsync cannot access recyclebin folder
130
120
if ( AppInstance . FilesystemViewModel . Connection != null )
You can’t perform that action at this time.
0 commit comments