Commit 3ee6a5da authored by Jan Lepper's avatar Jan Lepper
Browse files

FIXED: [ 315357 ] krarc silently fails to display contents of some zip files

BUG: 315357

Zip files containing paths with "." as a path component are still not handled,
but now krarc reports an error instead silently failing.
parent 9db8b066
FIXED: [ 315357 ] krarc silently fails to display contents of some zip files
zip files containing paths with "." as a path component are still not handled,
but now krarc reports an error instead silently failing
FIXED: [ 310722 ] viewer crash when opening file
FIXED: search result view always displays owner and group as "root"
(may not work for remote search)
......
......@@ -952,11 +952,8 @@ bool kio_krarcProtocol::initDirDict(const KUrl&url, bool forced)
root->append(entry);
if (arcType == "bzip2" || arcType == "lzma" || arcType == "xz") {
KRDEBUG("Got me here...");
parseLine(0, "");
return true;
}
if (arcType == "bzip2" || arcType == "lzma" || arcType == "xz")
abort();
char buf[1000];
QString line;
......@@ -1114,6 +1111,14 @@ UDSEntryList* kio_krarcProtocol::addNewDir(QString path)
QString name = path.mid(path.lastIndexOf(DIR_SEPARATOR, -2) + 1);
name = name.left(name.length() - 1);
if (name == "." || name == "..") { // entries with these names wouldn't be displayed
// don't translate since this is an internal error
QString err = QString("Cannot handle path: ") + path;
kDebug()<<"ERROR:"<<err;
error(KIO::ERR_INTERNAL, err);
exit();
}
UDSEntry entry;
entry.insert(KIO::UDSEntry::UDS_NAME, name);
mode_t mode = parsePermString("drwxr-xr-x");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment