Bugfix (Windows): Bindata wallpapers weren't resolving

* The Windows build of v0.6.0 couldn't load embedded wallpapers such as
  legal.png when asked, but could load the hard-coded default.png
* Root cause was the filesystem.FindFile() checking for path separators
  in the filepath, and on Win32 this is \ but the internal wallpaper
  paths use /
This commit is contained in:
Noah 2021-07-11 12:31:39 -07:00
parent 1105d9312a
commit 0af4dd40bc

View File

@ -87,7 +87,8 @@ func FindFile(filename string) (string, error) {
var filetype string
// If the filename has path separators, return it as-is.
if strings.ContainsRune(filename, filepath.Separator) {
if strings.ContainsRune(filename, filepath.Separator) ||
strings.ContainsRune(filename, '/') {
return filename, nil
}