Skip to content

Commit

Permalink
Dichotomy of problem with FCBak
Browse files Browse the repository at this point in the history
  • Loading branch information
0penBrain committed Jul 23, 2023
1 parent 2dfab2f commit 8cc1cd7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/App/Document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1669,15 +1669,16 @@ class BackupPolicy {
Base::FileInfo di(fi.dirPath());
std::vector<Base::FileInfo> backup;
std::vector<Base::FileInfo> files = di.getDirectoryContent();
/********** If FOR block commented, CI passes *************/
for (std::vector<Base::FileInfo>::iterator it = files.begin(); it != files.end(); ++it) {
if (it->isFile()) {
Base::Console().Warning("FILE\n");
/*if (it->exists() && it->isFile()) {
std::string file = it->fileName();
std::string fext = it->extension();
std::string fextUp = fext;
std::transform(fextUp.begin(), fextUp.end(), fextUp.begin(),(int (*)(int))toupper);
// re-enforcing identification of the backup file

// old case : the name starts with the full name of the project and follows with numbers
if ((startsWith(file, fn) &&
(file.length() > fn.length()) &&
Expand All @@ -1688,7 +1689,7 @@ class BackupPolicy {
(checkValidComplement(file, pbn, fext)))) {
backup.push_back(*it);
}
}
}*/
}

if (!backup.empty() && (int)backup.size() >= numberOfFiles) {
Expand All @@ -1711,7 +1712,6 @@ class BackupPolicy {
}
}
}

}
} //end remove backup

Expand Down

0 comments on commit 8cc1cd7

Please sign in to comment.