mirror of
https://github.com/J-D-K/JKSV.git
synced 2026-03-22 01:34:13 -05:00
29 lines
1.0 KiB
C++
29 lines
1.0 KiB
C++
#include "tasks/backup.hpp"
|
|
|
|
#include "config.hpp"
|
|
#include "error.hpp"
|
|
#include "fs/fs.hpp"
|
|
|
|
#include <cstring>
|
|
|
|
void tasks::backup::create_new_backup(sys::ProgressTask *task,
|
|
data::User *user,
|
|
data::TitleInfo *titleInfo,
|
|
fslib::Path target,
|
|
BackupMenuState *spawningState)
|
|
{
|
|
const bool exportZip = config::get_by_key(config::keys::EXPORT_TO_ZIP);
|
|
const bool autoUpload = config::get_by_key(config::keys::AUTO_UPLOAD);
|
|
const bool hasZipExt = std::strstr(target.full_path(), ".zip");
|
|
const const bool uint64_t applicationID = titleInfo->get_application_id();
|
|
const FsSaveDataInfo *saveInfo = user->get_save_info_by_id(applicationID);
|
|
if (error::is_null(saveInfo))
|
|
{
|
|
task->finished();
|
|
return;
|
|
}
|
|
|
|
fs::SaveMetaData saveMeta{};
|
|
const bool hasValidMeta = fs::fill_save_meta_data(saveInfo, saveMeta);
|
|
}
|