SVN commit 584351 by dfaure: Fix handling of hardlinks again: fix for #20344 was wrong - testcase: http://www.ibiblio.org/pub/Linux/utils/disk-management/cdrecord-1.9.tar.gz this testcase broke too: "echo hello > A; ln A B; echo C>C; tar cf hardlink.tar A B C" M +2 -2 kio/ktar.cpp M +3 -1 tests/ktartest.cpp --- branches/KDE/3.5/kdelibs/kio/kio/ktar.cpp #584350:584351 @@ -439,8 +439,8 @@ // Let's hack around hard links. Our classes don't support that, so make them symlinks if ( typeflag == '1' ) { - size = nm.length(); // in any case, we don't want to skip the real size, hence this resetting of size - kdDebug(7041) << "HARD LINK, setting size to " << size << endl; + kdDebug(7041) << "HARD LINK, setting size to 0 instead of " << size << endl; + size = 0; // no contents } //kdDebug(7041) << "KTar::openArchive file " << nm << " size=" << size << endl; --- branches/KDE/3.5/kdelibs/kio/tests/ktartest.cpp #584350:584351 @@ -30,7 +30,9 @@ for( ; it != l.end(); ++it ) { const KTarEntry* entry = dir->entry( (*it) ); - printf("mode=%07o %s %s %s%s isdir=%d\n", entry->permissions(), entry->user().latin1(), entry->group().latin1(), path.latin1(), (*it).latin1(), entry->isDirectory()); + printf("mode=%07o %s %s %s%s %d isdir=%d\n", entry->permissions(), entry->user().latin1(), entry->group().latin1(), path.latin1(), (*it).latin1(), + entry->isFile() ? static_cast(entry)->size() : 0, + entry->isDirectory()); if (entry->isDirectory()) recursive_print( (KTarDirectory *)entry, path+(*it)+"/" ); }