Skip to content

Commit

Permalink
Remove unused fileMapping() overload.
Browse files Browse the repository at this point in the history
  • Loading branch information
Holt59 committed Nov 10, 2023
1 parent f195a61 commit f8294ba
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 49 deletions.
44 changes: 0 additions & 44 deletions src/organizercore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2078,47 +2078,3 @@ std::vector<Mapping> OrganizerCore::fileMapping(const QString& profileName,

return result;
}

std::vector<Mapping> OrganizerCore::fileMapping(const QString& dataPath,
const QString& relPath,
const DirectoryEntry* base,
const DirectoryEntry* directoryEntry,
int createDestination)
{
std::vector<Mapping> result;

for (FileEntryPtr current : directoryEntry->getFiles()) {
bool isArchive = false;
int origin = current->getOrigin(isArchive);
if (isArchive || (origin == 0)) {
continue;
}

QString originPath = QString::fromStdWString(base->getOriginByID(origin).getPath());
QString fileName = QString::fromStdWString(current->getName());
// QString fileName = ToQString(current->getName());
QString source = originPath + relPath + fileName;
QString target = dataPath + relPath + fileName;
if (source != target) {
result.push_back({source, target, false, false});
}
}

// recurse into subdirectories
for (const auto& d : directoryEntry->getSubDirectories()) {
int origin = d->anyOrigin();

QString originPath = QString::fromStdWString(base->getOriginByID(origin).getPath());
QString dirName = QString::fromStdWString(d->getName());
QString source = originPath + relPath + dirName;
QString target = dataPath + relPath + dirName;

bool writeDestination = (base == directoryEntry) && (origin == createDestination);

result.push_back({source, target, true, writeDestination});
std::vector<Mapping> subRes =
fileMapping(dataPath, relPath + dirName + "\\", base, d, createDestination);
result.insert(result.end(), subRes.begin(), subRes.end());
}
return result;
}
5 changes: 0 additions & 5 deletions src/organizercore.h
Original file line number Diff line number Diff line change
Expand Up @@ -502,11 +502,6 @@ public slots:
std::vector<Mapping> fileMapping(const QString& profile,
const QString& customOverwrite);

std::vector<Mapping> fileMapping(const QString& dataPath, const QString& relPath,
const MOShared::DirectoryEntry* base,
const MOShared::DirectoryEntry* directoryEntry,
int createDestination);

private slots:

void onDirectoryRefreshed();
Expand Down

0 comments on commit f8294ba

Please sign in to comment.