We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1771dcc commit 58d860bCopy full SHA for 58d860b
CompactGUI/Services/WikiService.vb
@@ -23,11 +23,18 @@ Public Class WikiService : Implements IWikiService
23
Dim httpClient As New HttpClient
24
Dim res = Await httpClient.GetStreamAsync(dlPath)
25
26
- Using fs As New IO.FileStream(JSONFile.FullName, IO.FileMode.Create)
27
- Await res.CopyToAsync(fs)
28
- End Using
+ Try
+ Using fs As New IO.FileStream(JSONFile.FullName, IO.FileMode.Create)
+ Await res.CopyToAsync(fs)
29
+ End Using
30
+
31
+ Catch ex As IO.IOException
32
+ Debug.WriteLine("Could not update JSON file: file is in use.")
33
+ Return
34
+ Finally
35
+ httpClient.Dispose()
36
+ End Try
37
- httpClient.Dispose()
38
39
SettingsHandler.AppSettings.ResultsDBLastUpdated = DateTime.Now
40
Settings.Save()
0 commit comments