+2013-11-18 Vladimir Serbinenko <phcoder@gmail.com>
+
+ Fix handling of install lists.
+
2013-11-18 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/lib/sparc64/setjmp.S: Force spilling of current window.
}
il->n_alloc = il->n_entries + 1;
il->entries = xmalloc (il->n_alloc * sizeof (il->entries[0]));
+ ptr = val;
for (ce = il->entries; ; ce++)
{
const char *bptr;
*ce = xmalloc (ptr - bptr + 1);
memcpy (*ce, bptr, ptr - bptr);
(*ce)[ptr - bptr] = '\0';
- ce++;
}
*ce = NULL;
}
install_modules.entries);
for (p = path_list; p; p = p->next)
{
- char *srcf = grub_util_path_concat_ext (2, src, p->name, ".mo");
- char *dstf = grub_util_path_concat_ext (2, dst, p->name, ".mo");
+ const char *srcf = p->name;
+ const char *dir;
+ char *dstf;
+
+ dir = grub_strrchr (srcf, '/');
+ if (dir)
+ dir++;
+ else
+ dir = srcf;
+ dstf = grub_util_path_concat (2, dst, dir);
grub_install_compress_file (srcf, dstf, 1);
- free (srcf);
free (dstf);
}
}