[nostalgia/tools/pack] Cleanup

This commit is contained in:
Gary Talent 2021-04-29 01:18:26 -05:00
parent cbc0fc983c
commit 809dbc69b1
2 changed files with 6 additions and 7 deletions

View File

@ -7,6 +7,7 @@
*/ */
#include <ox/claw/read.hpp> #include <ox/claw/read.hpp>
#include <ox/fs/fs.hpp>
#include "pack.hpp" #include "pack.hpp"
@ -37,8 +38,8 @@ static ox::Error transformClaw(ox::FileSystem *dest, const ox::String &path) noe
oxTracef("pack::transformClaw", "path: {}", path); oxTracef("pack::transformClaw", "path: {}", path);
oxRequire(fileList, dest->ls(path)); oxRequire(fileList, dest->ls(path));
for (auto i = 0u; i < fileList.size(); ++i) { for (auto i = 0u; i < fileList.size(); ++i) {
auto &name = fileList[i]; const auto &name = fileList[i];
auto filePath = path + name; const auto filePath = path + name;
oxRequire(stat, dest->stat(filePath.c_str())); oxRequire(stat, dest->stat(filePath.c_str()));
if (stat.fileType == ox::FileType_Directory) { if (stat.fileType == ox::FileType_Directory) {
const auto dir = path + name + '/'; const auto dir = path + name + '/';
@ -77,8 +78,8 @@ static ox::Error copy(ox::FileSystem *src, ox::FileSystem *dest, const ox::Strin
// copy // copy
oxRequire(fileList, src->ls(path)); oxRequire(fileList, src->ls(path));
for (auto i = 0u; i < fileList.size(); ++i) { for (auto i = 0u; i < fileList.size(); ++i) {
auto &name = fileList[i]; const auto &name = fileList[i];
auto currentFile = path + name; const auto currentFile = path + name;
if (currentFile == "/.nostalgia") { if (currentFile == "/.nostalgia") {
continue; continue;
} }

View File

@ -6,10 +6,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
#include <ox/fs/fs.hpp>
namespace nostalgia { namespace nostalgia {
ox::Error pack(ox::FileSystem *src, ox::FileSystem *dest) noexcept; class ox::Error pack(class ox::FileSystem *src, class ox::FileSystem *dest) noexcept;
} }