Skip to content

Commit

Permalink
replace fn by filename
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
  • Loading branch information
mgallien committed Dec 1, 2022
1 parent 32c1a08 commit 0c4d898
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/libsync/owncloudpropagator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -915,17 +915,17 @@ bool OwncloudPropagator::createConflict(const SyncFileItemPtr &item,

OCC::Optional<QString> OwncloudPropagator::createCaseClashConflict(const SyncFileItemPtr &item, const QString &temporaryDownloadedFile)
{
const auto fn = fullLocalPath(item->_file);
const auto filename = fullLocalPath(item->_file);

auto conflictModTime = FileSystem::getModTime(fn);
auto conflictModTime = FileSystem::getModTime(filename);
if (conflictModTime <= 0) {
return tr("Impossible to get modification time for file in conflict %1").arg(fn);
return tr("Impossible to get modification time for file in conflict %1").arg(filename);
}

const auto conflictFileName = Utility::makeCaseClashConflictFileName(item->_file, Utility::qDateTimeFromTime_t(conflictModTime));
const auto conflictFilePath = fullLocalPath(conflictFileName);

emit touchedFile(fn);
emit touchedFile(filename);
emit touchedFile(conflictFilePath);

qCInfo(lcPropagator) << "rename from" << temporaryDownloadedFile << "to" << conflictFilePath;
Expand All @@ -934,13 +934,13 @@ OCC::Optional<QString> OwncloudPropagator::createCaseClashConflict(const SyncFil

// If the file is locked, we want to retry this sync when it
// becomes available again.
if (FileSystem::isFileLocked(fn)) {
emit seenLockedFile(fn);
if (FileSystem::isFileLocked(filename)) {
emit seenLockedFile(filename);
}

return renameError;
}
qCInfo(lcPropagator) << "Created case clash conflict file" << fn << "->" << conflictFileName;
qCInfo(lcPropagator) << "Created case clash conflict file" << filename << "->" << conflictFileName;

// Create a new conflict record. To get the base etag, we need to read it from the db.
auto conflictRecord = ConflictRecord{conflictFileName.toUtf8(), {}, item->_previousModtime, {}, item->_file.toUtf8()};
Expand Down

0 comments on commit 0c4d898

Please sign in to comment.