[nostalgia/pack] Make pack ignore /.nostalgia
This commit is contained in:
parent
167e470091
commit
fc246ee396
@ -22,6 +22,10 @@ namespace {
|
|||||||
return str.size() >= ending.size() && str.substr(str.size() - ending.size()) == ending;
|
return str.size() >= ending.size() && str.substr(str.size() - ending.size()) == ending;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static_assert(endsWith("asdf", "df"));
|
||||||
|
static_assert(!endsWith("asdf", "awefawe"));
|
||||||
|
static_assert(!endsWith("asdf", "eu"));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert path references to inodes to save space
|
* Convert path references to inodes to save space
|
||||||
* @param buff buffer holding file
|
* @param buff buffer holding file
|
||||||
@ -86,8 +90,11 @@ struct VerificationPair {
|
|||||||
std::vector<VerificationPair> verficationPairs;
|
std::vector<VerificationPair> verficationPairs;
|
||||||
// copy
|
// copy
|
||||||
oxReturnError(src->ls(path.c_str(), [&verficationPairs, src, dest, path](std::string name, ox::InodeId_t) {
|
oxReturnError(src->ls(path.c_str(), [&verficationPairs, src, dest, path](std::string name, ox::InodeId_t) {
|
||||||
std::cout << "reading " << name << '\n';
|
|
||||||
auto currentFile = path + name;
|
auto currentFile = path + name;
|
||||||
|
if (currentFile == "/.nostalgia") {
|
||||||
|
return OxError(0);
|
||||||
|
}
|
||||||
|
std::cout << "reading " << name << '\n';
|
||||||
auto [stat, err] = src->stat((currentFile).c_str());
|
auto [stat, err] = src->stat((currentFile).c_str());
|
||||||
oxReturnError(err);
|
oxReturnError(err);
|
||||||
if (stat.fileType == ox::FileType_Directory) {
|
if (stat.fileType == ox::FileType_Directory) {
|
||||||
|
Loading…
Reference in New Issue
Block a user