mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-24 02:42:52 +00:00
ark: handle abosolute path entries properly
This commit is contained in:
parent
a655d08b8d
commit
f9842ce013
1 changed files with 2 additions and 5 deletions
|
@ -220,11 +220,8 @@ bool LibArchiveInterface::copyFiles(const QVariantList& files, const QString& de
|
||||||
QString entryName = QDir::fromNativeSeparators(QFile::decodeName(archive_entry_pathname(entry)));
|
QString entryName = QDir::fromNativeSeparators(QFile::decodeName(archive_entry_pathname(entry)));
|
||||||
|
|
||||||
if (entryName.startsWith(QLatin1Char( '/' ))) {
|
if (entryName.startsWith(QLatin1Char( '/' ))) {
|
||||||
//for now we just can't handle absolute filenames in a tar archive.
|
// remove leading slash from absolute path entries
|
||||||
//TODO: find out what to do here!!
|
entryName = entryName.mid(1);
|
||||||
emit error(i18n("This archive contains archive entries with absolute paths, which are not yet supported by ark."));
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (files.contains(entryName) || entryName == fileBeingRenamed || extractAll) {
|
if (files.contains(entryName) || entryName == fileBeingRenamed || extractAll) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue