do_strip is used on the filename and the target of a symlink. The link target is either a relative or absolute path, the later not prefixed with the to be stripped path. I think it is wrong to call the strip function on the link target if the file type is a symlink. The following patch fixes this.
--- src/filed/backup.c 2007-06-24 17:27:12.000000000 +0000
+++ src/filed/backup.c 2007-11-20 22:31:43.000000000 +0000
@@ -1151,7 +1151,7 @@
* I.e. if either stripping fails don't strip anything.
*/
if (do_strip(ff_pkt->strip_path, ff_pkt->fname)) {
- if (ff_pkt->fname != ff_pkt->link) {
+ if (ff_pkt->type != FT_LNK && ff_pkt->fname != ff_pkt->link) {
pm_strcpy(ff_pkt->link_save, ff_pkt->link);
if (!do_strip(ff_pkt->strip_path, ff_pkt->link)) {
strcpy(ff_pkt->link, ff_pkt->link_save);
@@ -1170,7 +1170,7 @@
return;
}
strcpy(ff_pkt->fname, ff_pkt->fname_save);
- if (ff_pkt->fname != ff_pkt->link) {
+ if (ff_pkt->type != FT_LNK && ff_pkt->fname != ff_pkt->link) {
strcpy(ff_pkt->link, ff_pkt->link_save);
}
}
Bastian
--
It would be illogical to kill without reason.
-- Spock, "Journey to Babel", stardate 3842.4
signature.asc
Description: Digital signature

