| 1 | This fixes the "No such file or directory" error when invoking
|
| 2 | flatpak-validate-icon with the --sandbox argument.
|
| 3 |
|
| 4 | diff --git a/icon-validator/validate-icon.c b/icon-validator/validate-icon.c
|
| 5 | index 6c3d152..0d70e55 100644
|
| 6 | |
| 7 | |
| 8 | @@ -163,7 +163,7 @@ rerun_in_sandbox (const char *arg_width,
|
| 9 | const char *arg_height,
|
| 10 | const char *filename)
|
| 11 | {
|
| 12 | - const char * const usrmerged_dirs[] = { "bin", "lib32", "lib64", "lib", "sbin" };
|
| 13 | + const char * const usrmerged_dirs[] = { };
|
| 14 | int i;
|
| 15 | g_autoptr(GPtrArray) args = g_ptr_array_new_with_free_func (g_free);
|
| 16 | char validate_icon[PATH_MAX + 1];
|
| 17 | @@ -183,8 +183,7 @@ rerun_in_sandbox (const char *arg_width,
|
| 18 | "--unshare-ipc",
|
| 19 | "--unshare-net",
|
| 20 | "--unshare-pid",
|
| 21 | - "--ro-bind", "/usr", "/usr",
|
| 22 | - "--ro-bind-try", "/etc/ld.so.cache", "/etc/ld.so.cache",
|
| 23 | + "--ro-bind", "@storeDir@", "@storeDir@",
|
| 24 | "--ro-bind", validate_icon, validate_icon,
|
| 25 | NULL);
|
| 26 |
|
| 27 | @@ -227,6 +226,10 @@ rerun_in_sandbox (const char *arg_width,
|
| 28 | add_args (args, "--setenv", "G_MESSAGES_DEBUG", g_getenv ("G_MESSAGES_DEBUG"), NULL);
|
| 29 | if (g_getenv ("G_MESSAGES_PREFIXED"))
|
| 30 | add_args (args, "--setenv", "G_MESSAGES_PREFIXED", g_getenv ("G_MESSAGES_PREFIXED"), NULL);
|
| 31 | + if (g_getenv ("GDK_PIXBUF_MODULE_FILE"))
|
| 32 | + add_args (args, "--setenv", "GDK_PIXBUF_MODULE_FILE", g_getenv ("GDK_PIXBUF_MODULE_FILE"), NULL);
|
| 33 | + if (g_getenv ("XDG_DATA_DIRS"))
|
| 34 | + add_args (args, "--setenv", "XDG_DATA_DIRS", g_getenv ("XDG_DATA_DIRS"), NULL);
|
| 35 |
|
| 36 | add_args (args, validate_icon, arg_width, arg_height, filename, NULL);
|
| 37 | g_ptr_array_add (args, NULL);
|