@@ -36,6 +36,7 @@ public MainWindow()
3636 private void InitializeGameRepo ( string repoPath )
3737 {
3838 Resources [ "gameRepo" ] = FileHelper . InitializeRepo ( repoPath ) ;
39+ IconHelper . GetIcons ( GetRepo ( ) ) ;
3940 EnableGlobalButtons ( true ) ;
4041 }
4142 private Repo GetRepo ( )
@@ -128,7 +129,12 @@ private async Task SyncGameSaveAsync()
128129 {
129130 if ( string . IsNullOrEmpty ( GetCurrentGame ( ) . SavePath ) )
130131 {
131- Growl . Warning ( Strings . NoSavePath ) ;
132+ Growl . Error ( Strings . NoSavePath ) ;
133+ return ;
134+ }
135+ if ( ! WebDAVHelper . IsInitialized )
136+ {
137+ Growl . Error ( Strings . WebDAVNotEnabledWarn ) ;
132138 return ;
133139 }
134140 syncButton . IsEnabled = false ;
@@ -144,6 +150,7 @@ private void RescanButton_Click(object sender, RoutedEventArgs e)
144150 {
145151 EnableGlobalButtons ( false ) ;
146152 FileHelper . ScanGames ( GetRepo ( ) ) ;
153+ IconHelper . GetIcons ( GetRepo ( ) ) ;
147154 EnableGlobalButtons ( true ) ;
148155 }
149156
@@ -184,7 +191,7 @@ private async void RefreshInfoButton_Click(object sender, RoutedEventArgs e)
184191 private void OpenGameFolderButton_Click ( object sender , RoutedEventArgs e )
185192 {
186193 Process . Start ( "explorer.exe" , gameList . SelectedItem is Game game ?
187- System . IO . Path . Combine ( GetRepo ( ) . LocalPath , game . DirectoryName ) :
194+ Path . Combine ( GetRepo ( ) . LocalPath , game . DirectoryName ) :
188195 throw new Exception ( "No game selected." ) ) ;
189196 }
190197
@@ -254,12 +261,13 @@ private void VndbButton_Click(object sender, RoutedEventArgs e)
254261 }
255262 }
256263
257- private void SettingsButton_Click ( object sender , RoutedEventArgs e )
264+ private async void SettingsButton_Click ( object sender , RoutedEventArgs e )
258265 {
259266 SettingsWindow settingsWindow = new ( ) ;
260267 settingsWindow . ShowDialog ( ) ;
261268 // Reinitialize WebDAV client with new settings
262- Task . Run ( WebDAVHelper . InitializeClient ) ;
269+ if ( ! await WebDAVHelper . InitializeClient ( ) )
270+ Growl . Warning ( Strings . WebDAVInitFailed ) ;
263271 }
264272
265273 private async void SyncButton_Click ( object sender , RoutedEventArgs e )
0 commit comments