Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.1
kdelibs4
patch-r906020.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File patch-r906020.diff of Package kdelibs4
Subject: Fix bug in KArchiveDirectory paths starting with '.' From: wstephenson@suse.de Bug: Patch-upstream: 906020 --- kio/kio/karchive.cpp (revision 906019) +++ kio/kio/karchive.cpp (revision 906020) @@ -693,7 +693,7 @@ QStringList KArchiveDirectory::entries() const KArchiveEntry* KArchiveDirectory::entry( const QString& _name ) const { - QString name = _name; + QString name = QDir::cleanPath(_name); int pos = name.indexOf( '/' ); if ( pos == 0 ) // ouch absolute path (see also KArchive::findOrCreate) { @@ -713,8 +713,8 @@ const KArchiveEntry* KArchiveDirectory:: } if ( pos != -1 ) { - QString left = name.left( pos ); - QString right = name.mid( pos + 1 ); + const QString left = name.left(pos); + const QString right = name.mid(pos + 1); //kDebug() << "left=" << left << "right=" << right; --- kio/tests/karchivetest.cpp (revision 906019) +++ kio/tests/karchivetest.cpp (revision 906020) @@ -179,6 +179,20 @@ static void testFileData( KArchive* arch QVERIFY(e->isFile()); QCOMPARE(e->symLinkTarget(), QString("test3")); #endif + + // Test "./" prefix for KOffice (xlink:href="./ObjectReplacements/Object 1") + e = dir->entry( "./hugefile" ); + QVERIFY( e && e->isFile() ); + e = dir->entry( "./my/dir/test3" ); + QVERIFY( e && e->isFile() ); + + // Test directory entries + e = dir->entry( "my" ); + QVERIFY(e && e->isDirectory()); + e = dir->entry( "my/" ); + QVERIFY(e && e->isDirectory()); + e = dir->entry( "./my/" ); + QVERIFY(e && e->isDirectory()); } static void testCopyTo( KArchive* archive ) Index: kio/kio/karchive.cpp =================================================================== Index: kio/tests/karchivetest.cpp ===================================================================
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor