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 39af8ee
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/App/Document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1642,6 +1642,9 @@ class BackupPolicy {
"Cannot rename tmp save file to project file", targetname);
}
}

#include <stdio.h>

void applyTimeStamp(const std::string& sourcename, const std::string& targetname) {
Base::FileInfo fi(targetname);

Expand Down Expand Up @@ -1669,15 +1672,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()) {
std::string file = it->fileName();
std::cout << "FILE : " << it->fileName() << std::endl << std::flush;
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 +1691,7 @@ class BackupPolicy {
((fextUp == "FCBAK") && startsWith(file, pbn) &&
(checkValidComplement(file, pbn, fext)))) {
backup.push_back(*it);
}
}*/
}
}

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

}
} //end remove backup

Expand Down

0 comments on commit 39af8ee

Please sign in to comment.