Background: don't require a URI scheme for picture-uri
Migration from old settings can result in a path instead of URI there. This is technically invalid, but can easily recognize it and avoid the crash. Minor changes by Ray Strode https://bugzilla.gnome.org/show_bug.cgi?id=702121
This commit is contained in:
parent
c1d107a682
commit
35abf39971
@ -590,7 +590,16 @@ const Background = new Lang.Class({
|
||||
}
|
||||
|
||||
let uri = this._settings.get_string(PICTURE_URI_KEY);
|
||||
let filename = Gio.File.new_for_uri(uri).get_path();
|
||||
let filename;
|
||||
if (GLib.uri_parse_scheme(uri) != null)
|
||||
filename = Gio.File.new_for_uri(uri).get_path();
|
||||
else
|
||||
filename = uri;
|
||||
|
||||
if (!filename) {
|
||||
this._setLoaded();
|
||||
return;
|
||||
}
|
||||
|
||||
this._loadFile(filename);
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user