Bug fix: Empty symolic link target components which represent add-on slashes were written with ROOT flag set
This commit is contained in:
parent
73698da6e3
commit
fa19885131
@ -1858,6 +1858,7 @@ int rrip_get_susp_fields(Ecma119Image *t, Ecma119Node *n, int type,
|
|||||||
char *cur, *prev;
|
char *cur, *prev;
|
||||||
size_t sl_len = 5;
|
size_t sl_len = 5;
|
||||||
int cew = (nm_type == 1); /* are we writing to CE? */
|
int cew = (nm_type == 1); /* are we writing to CE? */
|
||||||
|
int first_comp = 1;
|
||||||
|
|
||||||
dest = get_rr_fname(t, ((IsoSymlink*)n->node)->dest);
|
dest = get_rr_fname(t, ((IsoSymlink*)n->node)->dest);
|
||||||
if (dest == NULL)
|
if (dest == NULL)
|
||||||
@ -1879,10 +1880,11 @@ int rrip_get_susp_fields(Ecma119Image *t, Ecma119Node *n, int type,
|
|||||||
clen = strlen(prev);
|
clen = strlen(prev);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clen == 0) {
|
if (clen == 0 && first_comp) {
|
||||||
/* this refers to the roor directory, '/' */
|
/* Mark as root directory of absolute link target path */
|
||||||
cflag = 1 << 3;
|
cflag = 1 << 3;
|
||||||
}
|
}
|
||||||
|
first_comp = 0;
|
||||||
if (clen == 1 && prev[0] == '.') {
|
if (clen == 1 && prev[0] == '.') {
|
||||||
clen = 0;
|
clen = 0;
|
||||||
cflag = 1 << 1;
|
cflag = 1 << 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user