- if (i == ARRAY_SIZE(takeover_devs))
- ret = g_open_raw(pathname, flags, mode);
+ if (i == ARRAY_SIZE(takeover_devs)) {
+ const char *w_path = emu_wrap_path(pathname);
+ ret = g_open_raw(w_path, flags, mode);
+ emu_wrap_path_free(w_path, pathname);
+ }