Ticket #39018: patch-src_archives.c.diff
File patch-src_archives.c.diff, 1.0 KB (added by cooljeanius (Eric Gallager), 11 years ago) |
---|
-
src/archives.c
old new 712 712 { 713 713 static struct varbuf conffderefn, symlinkfn; 714 714 const char *usename; 715 char *s = NULL; 715 716 struct filenamenode *usenode; 716 717 717 718 struct conffile *conff; … … 771 772 st = &ti->stat; 772 773 773 774 usenode = namenodetouse(nifd->namenode, tc->pkg, &tc->pkg->available); 774 usename = usenode->name + 1; /* Skip the leading '/'. */ 775 usename = usenode->name; /* Skip the leading '/' */ 776 if (*usename == '.' && *usename + 1 == '/') { 777 usename += 1; /* Skip the leading `.' */ 778 } else if (*usename != '/') { 779 s = malloc(strlen(usename) + 2); /* 1 for NULL, one for `/' we're going to add */ 780 strcpy(s + 1, usename); 781 *s = '/'; 782 usename = s; 783 } 775 784 776 785 trig_file_activate(usenode, tc->pkg); 777 786 … … 784 793 } 785 794 786 795 setupfnamevbs(usename); 796 797 if (s != NULL) { 798 free(s); 799 } 787 800 788 801 statr= lstat(fnamevb.buf,&stab); 789 802 if (statr) {