@@ -39,11 +39,11 @@ public static async void CutItem(IShellPage associatedInstance)
39
39
{
40
40
await Task . WhenAll ( associatedInstance . SlimContentPage . SelectedItems . ToList ( ) . Select ( async listedItem =>
41
41
{
42
- // FTP don't support cut, fallback to copy
43
- if ( listedItem is not FtpItem )
42
+ // FTP don't support cut, fallback to copy
43
+ if ( listedItem is not FtpItem )
44
44
{
45
- // Dim opacities accordingly
46
- listedItem . Opacity = Constants . UI . DimItemOpacity ;
45
+ // Dim opacities accordingly
46
+ listedItem . Opacity = Constants . UI . DimItemOpacity ;
47
47
}
48
48
49
49
if ( listedItem is FtpItem ftpItem )
@@ -80,31 +80,24 @@ await Task.WhenAll(associatedInstance.SlimContentPage.SelectedItems.ToList().Sel
80
80
}
81
81
catch
82
82
{
83
- return ;
84
- }
85
-
86
- if ( result . ErrorCode == FileSystemStatusCode . NotFound )
87
- {
88
- associatedInstance . SlimContentPage . ItemManipulationModel . RefreshItemsOpacity ( ) ;
89
- return ;
90
- }
91
- else if ( result . ErrorCode == FileSystemStatusCode . Unauthorized )
92
- {
93
- // Try again with fulltrust process
94
- var connection = await AppServiceConnectionHelper . Instance ;
95
- if ( connection != null )
83
+ if ( result . ErrorCode == FileSystemStatusCode . Unauthorized )
96
84
{
97
- string filePaths = string . Join ( '|' , associatedInstance . SlimContentPage . SelectedItems . Select ( x => x . ItemPath ) ) ;
98
- AppServiceResponseStatus status = await connection . SendMessageAsync ( new ValueSet ( )
99
- {
100
- { "Arguments" , "FileOperation" } ,
101
- { "fileop" , "Clipboard" } ,
102
- { "filepath" , filePaths } ,
103
- { "operation" , ( int ) DataPackageOperation . Move }
104
- } ) ;
105
- if ( status == AppServiceResponseStatus . Success )
85
+ // Try again with fulltrust process
86
+ var connection = await AppServiceConnectionHelper . Instance ;
87
+ if ( connection != null )
106
88
{
107
- return ;
89
+ string filePaths = string . Join ( '|' , associatedInstance . SlimContentPage . SelectedItems . Select ( x => x . ItemPath ) ) ;
90
+ AppServiceResponseStatus status = await connection . SendMessageAsync ( new ValueSet ( )
91
+ {
92
+ { "Arguments" , "FileOperation" } ,
93
+ { "fileop" , "Clipboard" } ,
94
+ { "filepath" , filePaths } ,
95
+ { "operation" , ( int ) DataPackageOperation . Move }
96
+ } ) ;
97
+ if ( status == AppServiceResponseStatus . Success )
98
+ {
99
+ return ;
100
+ }
108
101
}
109
102
}
110
103
associatedInstance . SlimContentPage . ItemManipulationModel . RefreshItemsOpacity ( ) ;
@@ -188,23 +181,21 @@ await Task.WhenAll(associatedInstance.SlimContentPage.SelectedItems.ToList().Sel
188
181
}
189
182
catch
190
183
{
191
- return ;
192
- }
193
-
194
- if ( result . ErrorCode == FileSystemStatusCode . Unauthorized )
195
- {
196
- // Try again with fulltrust process
197
- var connection = await AppServiceConnectionHelper . Instance ;
198
- if ( connection != null )
184
+ if ( result . ErrorCode == FileSystemStatusCode . Unauthorized )
199
185
{
200
- string filePaths = string . Join ( '|' , associatedInstance . SlimContentPage . SelectedItems . Select ( x => x . ItemPath ) ) ;
201
- await connection . SendMessageAsync ( new ValueSet ( )
186
+ // Try again with fulltrust process
187
+ var connection = await AppServiceConnectionHelper . Instance ;
188
+ if ( connection != null )
202
189
{
203
- { "Arguments" , "FileOperation" } ,
204
- { "fileop" , "Clipboard" } ,
205
- { "filepath" , filePaths } ,
206
- { "operation" , ( int ) DataPackageOperation . Copy }
207
- } ) ;
190
+ string filePaths = string . Join ( '|' , associatedInstance . SlimContentPage . SelectedItems . Select ( x => x . ItemPath ) ) ;
191
+ await connection . SendMessageAsync ( new ValueSet ( )
192
+ {
193
+ { "Arguments" , "FileOperation" } ,
194
+ { "fileop" , "Clipboard" } ,
195
+ { "filepath" , filePaths } ,
196
+ { "operation" , ( int ) DataPackageOperation . Copy }
197
+ } ) ;
198
+ }
208
199
}
209
200
return ;
210
201
}
0 commit comments