mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-03 00:39:02 +00:00
Add safety checks for low SD card space (#90)
* Some attempt. * Enable some-safety-freespace-work nightlies * Upload elf with nightly * *Derp fixes.* * Bye Bye testing things. * Revert "Upload elf with nightly" This reverts commit 303968cd78e466a3fcc010915565d8265acaa76a. * Add safety checks to fcopy Co-authored-by: StackZ <47382115+SuperSaiyajinStackZ@users.noreply.github.com>
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
*/
|
||||
|
||||
#include "extract.hpp"
|
||||
#include "files.hpp"
|
||||
#include "queueSystem.hpp"
|
||||
#include "scriptUtils.hpp"
|
||||
#include <archive.hpp>
|
||||
@@ -65,6 +66,8 @@ Result getExtractedSize(const std::string &archivePath, const std::string &wante
|
||||
}
|
||||
|
||||
Result extractArchive(const std::string &archivePath, const std::string &wantedFile, const std::string &outputPath) {
|
||||
if (getAvailableSpace() < extractSize) return -1; // Out of space.
|
||||
|
||||
archive *a = archive_read_new();
|
||||
archive_entry *entry;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user