Skip to content

Commit

Permalink
Fix empty download folder selection
Browse files Browse the repository at this point in the history
  • Loading branch information
achhabra2 committed Feb 10, 2022
1 parent ac4d441 commit 994fc19
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app.go
Expand Up @@ -383,9 +383,13 @@ func (b *App) SetDownloadsFolder() string {
runtime.LogInfo(b.ctx, "Error opening dialog")
b.ShowErrorDialog(err.Error())
}
b.c.DownloadPath = selection
b.UserPrefs.DownloadsDirectory = selection
b.PersistUserSettings()

// Check for empty / canceled string
if selection != "" {
b.c.DownloadPath = selection
b.UserPrefs.DownloadsDirectory = selection
b.PersistUserSettings()
}
return b.UserPrefs.DownloadsDirectory
}

Expand Down

0 comments on commit 994fc19

Please sign in to comment.