Commit 2d6fbadb authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

[libarchiveplugin] Handle absolute paths

... by treating them as relative to the archive root
parent db9d53bc
Pipeline #100412 passed with stage
in 2 minutes and 33 seconds
......@@ -264,12 +264,9 @@ bool LibarchivePlugin::extractFiles(const QVector<Archive::Entry*> &files, const
// For now we just can't handle absolute filenames in a tar archive.
// TODO: find out what to do here!!
// Don't allow absolute paths, instead, treat them like relative to the root of the archive.
if (entryName.startsWith(QLatin1Char( '/' ))) {
Q_EMIT error(i18n("This archive contains archive entries with absolute paths, "
"which are not supported by Ark."));
return false;
entryName.remove(0, 1);
// Should the entry be extracted?
Markdown is supported
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