extensions-tool: Handle existing extension folder
g_file_make_directory_with_parents() returns an error if the directory already exists (unlike g_mkdir_with_parents()), so it is currently impossible to install more than a single extension, whoops. Handle the error properly by just carrying on. https://gitlab.gnome.org/fmuellner/gnome-extensions-tool/merge_requests/3 https://gitlab.gnome.org/GNOME/gnome-shell/issues/1234
This commit is contained in:
parent
653e6c85bb
commit
9d5c743a98
@ -121,7 +121,12 @@ install_extension (const char *bundle,
|
||||
"gnome-shell", "extensions", NULL);
|
||||
|
||||
if (!g_file_make_directory_with_parents (dstdir, NULL, &error))
|
||||
goto err;
|
||||
{
|
||||
if (error->code == G_IO_ERROR_EXISTS)
|
||||
g_clear_error (&error);
|
||||
else
|
||||
goto err;
|
||||
}
|
||||
|
||||
uuid = json_object_get_string_member (metadata, "uuid");
|
||||
dst = g_file_get_child (dstdir, uuid);
|
||||
|
Loading…
Reference in New Issue
Block a user