mirror of
https://github.com/J-D-K/JKSV.git
synced 2026-04-26 10:15:22 -05:00
Make Dump All support zip option
This commit is contained in:
parent
122a4e9c31
commit
8ddc989152
24
src/file.cpp
24
src/file.cpp
|
|
@ -490,13 +490,25 @@ bool fs::dumpAllUserSaves(const data::user& u)
|
|||
if(fs::mountSave(u, u.titles[i]))
|
||||
{
|
||||
u.titles[i].createDir();
|
||||
switch(data::zip)
|
||||
{
|
||||
case true:
|
||||
{
|
||||
std::string outPath = u.titles[i].getPath() + u.getUsernameSafe() + " - " + util::getDateTime(util::DATE_FMT_YMD) + ".zip";
|
||||
zipFile zip = zipOpen(outPath.c_str(), 0);
|
||||
fs::copyDirToZip("sv:/", &zip);
|
||||
zipClose(zip, NULL);
|
||||
}
|
||||
break;
|
||||
|
||||
//sdmc:/JKSV/[title]/[user] - [date]/
|
||||
std::string outPath = u.titles[i].getPath() + u.getUsernameSafe() + " - " + util::getDateTime(util::DATE_FMT_ASC);
|
||||
mkdir(outPath.c_str(), 777);
|
||||
outPath += "/";
|
||||
fs::copyDirToDir("sv:/", outPath);
|
||||
|
||||
case false:
|
||||
{
|
||||
std::string outPath = u.titles[i].getPath() + u.getUsernameSafe() + " - " + util::getDateTime(util::DATE_FMT_YMD) + "/";
|
||||
mkdir(outPath.substr(0, outPath.length() - 1).c_str(), 777);
|
||||
fs::copyDirToDir("sv:/", outPath);
|
||||
}
|
||||
break;
|
||||
}
|
||||
fsdevUnmountDevice("sv");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user