1
0
mirror of https://github.com/QRouland/UTPass.git synced 2026-01-10 19:36:57 +00:00

Ensure that key and zip are deleted after import

This commit is contained in:
2025-02-04 13:37:25 +01:00
parent ba52ddac5c
commit 5582b4dd70
5 changed files with 38 additions and 14 deletions

View File

@@ -29,7 +29,7 @@ void Utils::unzipResult(bool err)
qDebug() << "Unzip Result";
if (err) {
qInfo() << "Unzip Failed";
emit unzipFailed("failed to unzip archive");
emit unzipFailed();
} else {
qInfo() << "Unzip Succeed";
@@ -45,3 +45,14 @@ QString Utils::manifestPath()
qInfo() << "Manifest path : " << path;
return path;
}
bool Utils::rmFile(QUrl file_url)
{
return QFile::remove(file_url.toLocalFile());
}
bool Utils::rmDir(QUrl dir_url)
{
QDir dir(dir_url.toLocalFile());
return dir.removeRecursively();
}