Managers: prepare BackupManager for the upcoming VFS.

This commit is contained in:
Guillaume Jacquemin 2024-07-11 18:06:08 +02:00
parent ccbafe5e30
commit 9f570a004b
Signed by: williamjcm
SSH key fingerprint: SHA256:AYLOg+iTV0ElElnlu4vqM4edFazVdRiuQB0Y5LoKc4A

View file

@ -20,6 +20,7 @@
#include <chrono>
#include <Corrade/Containers/GrowableArray.h>
#include <Corrade/Containers/Pair.h>
#include <Corrade/Containers/ScopeGuard.h>
#include <Corrade/Utility/Path.h>
#include <Corrade/Utility/String.h>
@ -243,9 +244,11 @@ BackupManager::scanSubdir(Containers::StringView subdir) {
zip_t* zip;
for(Containers::StringView file : files_view) {
Backup backup;
backup.filename = Utility::Path::join(full_subdir, file);
backup.filename = Utility::Path::join(subdir, file);
zip = zip_open(backup.filename.cbegin(), ZIP_RDONLY, &error_code);
auto full_path = Utility::Path::join(full_subdir, file);
zip = zip_open(full_path.cbegin(), ZIP_RDONLY, &error_code);
if(zip == nullptr) {
continue;
}