File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -174,16 +174,23 @@ public static void ExportUILog(StorageFile file)
174
174
{
175
175
lock ( Lock )
176
176
{
177
- var oldLog = File . OpenRead ( ApplicationData . Current . LocalCacheFolder . Path + @"\Signal-Windows.ui.log.old" ) ;
178
- var newLog = File . OpenRead ( ApplicationData . Current . LocalCacheFolder . Path + @"\Signal-Windows.ui.log" ) ;
179
177
FileIO . WriteTextAsync ( file , "" ) . AsTask ( ) . Wait ( ) ;
180
178
CachedFileManager . DeferUpdates ( file ) ;
181
179
var writer = file . OpenStreamForWriteAsync ( ) . Result ;
182
- MoveFileContent ( oldLog , writer ) ;
183
- MoveFileContent ( newLog , writer ) ;
180
+ try
181
+ {
182
+ var oldLog = File . OpenRead ( ApplicationData . Current . LocalCacheFolder . Path + @"\Signal-Windows.ui.log.old" ) ;
183
+ MoveFileContent ( oldLog , writer ) ;
184
+ oldLog . Dispose ( ) ;
185
+ } catch ( Exception e ) { }
186
+ try
187
+ {
188
+ var newLog = File . OpenRead ( ApplicationData . Current . LocalCacheFolder . Path + @"\Signal-Windows.ui.log" ) ;
189
+ MoveFileContent ( newLog , writer ) ;
190
+ newLog . Dispose ( ) ;
191
+ }
192
+ catch ( Exception e ) { }
184
193
Windows . Storage . Provider . FileUpdateStatus status = CachedFileManager . CompleteUpdatesAsync ( file ) . AsTask ( ) . Result ;
185
- oldLog . Dispose ( ) ;
186
- newLog . Dispose ( ) ;
187
194
}
188
195
}
189
196
You can’t perform that action at this time.
0 commit comments