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 4431ee7
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/App/Document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ recompute path. Also, it enables more complicated dependencies beyond trees.
#include <zipios++/zipinputstream.h>
#include <zipios++/zipoutputstream.h>
#include <zipios++/meta-iostreams.h>
#include <qdir.h>


FC_LOG_LEVEL_INIT("App", true, true, true)

Check warning on line 117 in src/App/Document.cpp

View workflow job for this annotation

GitHub Actions / Lint / Lint

non-POD static (LogLevel) [-Wclazy-non-pod-global-static]

Check warning on line 117 in src/App/Document.cpp

View workflow job for this annotation

GitHub Actions / Lint / Lint

variable '_s_fclvl' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
Expand Down Expand Up @@ -1668,16 +1669,18 @@ class BackupPolicy {
std::string fn = fi.fileName();
Base::FileInfo di(fi.dirPath());
std::vector<Base::FileInfo> backup;
std::vector<Base::FileInfo> files = di.getDirectoryContent();
for (std::vector<Base::FileInfo>::iterator it = files.begin(); it != files.end(); ++it) {
if (it->isFile()) {
std::string file = it->fileName();
//std::vector<Base::FileInfo> files = di.getDirectoryContent();
auto files = QDir(QLatin1String(fi.dirPath().c_str())).entryInfoList();
/********** If FOR block commented, CI passes *************/
for (auto it = files.begin(); it != files.end(); ++it) {
Base::Console().Warning("FILE : %s\n", it->fileName().toStdString());
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 @@ -1687,7 +1690,7 @@ class BackupPolicy {
((fextUp == "FCBAK") && startsWith(file, pbn) &&
(checkValidComplement(file, pbn, fext)))) {
backup.push_back(*it);
}
}*/
}
}

Expand All @@ -1711,7 +1714,6 @@ class BackupPolicy {
}
}
}

}
} //end remove backup

Expand Down

0 comments on commit 4431ee7

Please sign in to comment.