fix bryce upgrade path from 0 -> 2 re:naming
This commit is contained in:
parent
7a06a6b661
commit
39d561c8b4
|
@ -433,8 +433,11 @@ _bryce_rename(Bryce *b, int num)
|
||||||
char buf[1024], buf2[1024], *name, *p;
|
char buf[1024], buf2[1024], *name, *p;
|
||||||
|
|
||||||
name = strdup(b->name);
|
name = strdup(b->name);
|
||||||
|
if (b->version >= 2)
|
||||||
|
{
|
||||||
p = strrchr(name, '_');
|
p = strrchr(name, '_');
|
||||||
p[0] = 0;
|
p[0] = 0;
|
||||||
|
}
|
||||||
snprintf(buf, sizeof(buf), "__bryce%s", name);
|
snprintf(buf, sizeof(buf), "__bryce%s", name);
|
||||||
snprintf(buf2, sizeof(buf2), "__bryce%s_%d", name, num);
|
snprintf(buf2, sizeof(buf2), "__bryce%s_%d", name, num);
|
||||||
e_gadget_site_rename(buf, buf2);
|
e_gadget_site_rename(buf, buf2);
|
||||||
|
|
Loading…
Reference in New Issue