Fix wallpaper path handling with spaces (#908)

* Fix wallpaper path handling with spaces

* fix linting errors

---------

Co-authored-by: Jas Singh <jaskiratpal.singh@outlook.com>
This commit is contained in:
Sumit Pathak
2025-04-29 05:46:56 +05:30
committed by GitHub
parent 07a990f1f8
commit 0c82ce9704
4 changed files with 8 additions and 6 deletions

View File

@@ -9,7 +9,7 @@ export const WallpaperInputter = <T extends string | number | boolean | object>(
return (
<FileChooserButton
onFileSet={(self) => {
const newValue: string = self.get_uri()!.replace('file://', '');
const newValue: string = decodeURIComponent(self.get_uri()!.replace('file://', ''));
opt.set(newValue as T);
if (options.wallpaper.enable.get()) {
Wallpaper.setWallpaper(newValue);