From 0af4dd40bcdeb93294b47957696ada3556ee3924 Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Sun, 11 Jul 2021 12:31:39 -0700 Subject: [PATCH] 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 / --- pkg/filesystem/filesystem.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/filesystem/filesystem.go b/pkg/filesystem/filesystem.go index 9f55533..4c457cb 100644 --- a/pkg/filesystem/filesystem.go +++ b/pkg/filesystem/filesystem.go @@ -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 }