Ticket #39018: archives.c.rej

File archives.c.rej, 1.0 KB (added by cooljeanius (Eric Gallager), 12 years ago)

failed patch for archives.c

Line 
1***************
2*** 1216,1222 ****
3      }
4    }
5 
6-   usename= namenodetouse(nifd->namenode,tc->pkg)->name + 1; /* Skip the leading `/' */
7 
8    if (nifd->namenode->flags & fnnf_new_conff) {
9      /* If it's a conffile we have to extract it next to the installed
10--- 1217,1231 ----
11      }
12    }
13 
14+   usename= namenodetouse(nifd->namenode,tc->pkg)->name; /* Skip the leading `/' */
15+   if (*usename == '.' && *usename + 1 == '/') {
16+       usename += 1; /* Skip the leading `.' */
17+   } else if (*usename != '/') {
18+       s = malloc(strlen(usename) + 2); /* 1 for NULL, one for `/' we're going to add */
19+       strcpy(s + 1, usename);
20+       *s = '/';
21+       usename = s;
22+   }
23 
24    if (nifd->namenode->flags & fnnf_new_conff) {
25      /* If it's a conffile we have to extract it next to the installed
26***************
27*** 1228,1233 ****
28    }
29   
30    setupfnamevbs(usename);
31 
32    statr= lstat(fnamevb.buf,&stab);
33    if (statr) {
34--- 1237,1246 ----
35    }
36   
37    setupfnamevbs(usename);
38+
39+   if (s != NULL) {
40+       free(s);
41+   }
42 
43    statr= lstat(fnamevb.buf,&stab);
44    if (statr) {