mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
screencastService: Handle case where no videos directory exists
The videos directory doesn't necessarily have to exist, users are free to delete it. Right now we don't handle this case and screencasting fails. Let's handle it and fall back to the users home directory instead when xdg-videos doesn't exist. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2594>
This commit is contained in:
parent
d74dbee41b
commit
617997412e
1 changed files with 4 additions and 1 deletions
|
|
@ -315,7 +315,10 @@ var ScreencastService = class extends ServiceImplementation {
|
||||||
if (GLib.path_is_absolute(filename))
|
if (GLib.path_is_absolute(filename))
|
||||||
return filename;
|
return filename;
|
||||||
|
|
||||||
let videoDir = GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_VIDEOS);
|
const videoDir =
|
||||||
|
GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_VIDEOS) ||
|
||||||
|
GLib.get_home_dir();
|
||||||
|
|
||||||
return GLib.build_filenamev([videoDir, filename]);
|
return GLib.build_filenamev([videoDir, filename]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue