mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
extend log to get information about mtime modifications by the client
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
parent
b77fc9d4ff
commit
bf78f008bd
@ -146,6 +146,7 @@ void FolderWatcher::startNotificationTestWhenReady()
|
||||
auto path = _testNotificationPath;
|
||||
if (QFile::exists(path)) {
|
||||
auto mtime = FileSystem::getModTime(path);
|
||||
qCDebug(lcFolderWatcher()) << "setModTime" << path << (mtime + 1);
|
||||
FileSystem::setModTime(path, mtime + 1);
|
||||
} else {
|
||||
QFile f(path);
|
||||
|
||||
@ -1378,6 +1378,7 @@ void PropagateDirectory::slotSubJobsFinished(SyncFileItem::Status status)
|
||||
qCWarning(lcDirectory) << "Error writing to the database for file" << _item->_file;
|
||||
}
|
||||
|
||||
qCDebug(lcPropagator()) << "setModTime" << propagator()->fullLocalPath(_item->destination()) << _item->_modtime;
|
||||
FileSystem::setModTime(propagator()->fullLocalPath(_item->destination()), _item->_modtime);
|
||||
}
|
||||
|
||||
|
||||
@ -606,6 +606,7 @@ void PropagateDownloadFile::conflictChecksumComputed(const QByteArray &checksumT
|
||||
}
|
||||
if (_item->_modtime != _item->_previousModtime) {
|
||||
Q_ASSERT(_item->_modtime > 0);
|
||||
qCDebug(lcPropagateDownload()) << "setModTime" << fn << _item->_modtime;
|
||||
FileSystem::setModTime(fn, _item->_modtime);
|
||||
emit propagator()->touchedFile(fn);
|
||||
}
|
||||
@ -1162,6 +1163,7 @@ void PropagateDownloadFile::downloadFinished()
|
||||
if (_item->_modtime <= 0) {
|
||||
qCWarning(lcPropagateDownload()) << "invalid modified time" << _item->_file << _item->_modtime;
|
||||
}
|
||||
qCDebug(lcPropagateDownload()) << "setModTime" << _tmpFile.fileName() << _item->_modtime;
|
||||
FileSystem::setModTime(_tmpFile.fileName(), _item->_modtime);
|
||||
// We need to fetch the time again because some file systems such as FAT have worse than a second
|
||||
// Accuracy, and we really need the time from the file system. (#3103)
|
||||
|
||||
@ -779,6 +779,7 @@ OCC::Result<void, QString> OCC::CfApiWrapper::createPlaceholderInfo(const QStrin
|
||||
cloudEntry.FsMetadata.FileSize.QuadPart = 0;
|
||||
}
|
||||
|
||||
qCDebug(lcCfApiWrapper) << "CfCreatePlaceholders" << path << modtime;
|
||||
const qint64 result = CfCreatePlaceholders(localBasePath.data(), &cloudEntry, 1, CF_CREATE_FLAG_NONE, nullptr);
|
||||
if (result != S_OK) {
|
||||
qCWarning(lcCfApiWrapper) << "Couldn't create placeholder info for" << path << ":" << QString::fromWCharArray(_com_error(result).ErrorMessage());
|
||||
|
||||
@ -80,6 +80,7 @@ Result<void, QString> VfsSuffix::updateMetadata(const QString &filePath, time_t
|
||||
return {tr("Error updating metadata due to invalid modification time")};
|
||||
}
|
||||
|
||||
qCDebug(lcVfsSuffix()) << "setModTime" << filePath << modtime;
|
||||
FileSystem::setModTime(filePath, modtime);
|
||||
return {};
|
||||
}
|
||||
@ -108,6 +109,7 @@ Result<void, QString> VfsSuffix::createPlaceholder(const SyncFileItem &item)
|
||||
|
||||
file.write(" ");
|
||||
file.close();
|
||||
qCDebug(lcVfsSuffix()) << "setModTime" << fn << item._modtime;
|
||||
FileSystem::setModTime(fn, item._modtime);
|
||||
return {};
|
||||
}
|
||||
|
||||
@ -75,6 +75,7 @@ Result<void, QString> VfsXAttr::updateMetadata(const QString &filePath, time_t m
|
||||
return {tr("Error updating metadata due to invalid modification time")};
|
||||
}
|
||||
|
||||
qCDebug(lcVfsXAttr()) << "setModTime" << filePath << modtime;
|
||||
FileSystem::setModTime(filePath, modtime);
|
||||
return {};
|
||||
}
|
||||
@ -98,6 +99,7 @@ Result<void, QString> VfsXAttr::createPlaceholder(const SyncFileItem &item)
|
||||
|
||||
file.write(" ");
|
||||
file.close();
|
||||
qCDebug(lcVfsXAttr()) << "setModTime" << path << item._modtime;
|
||||
FileSystem::setModTime(path, item._modtime);
|
||||
return xattr::addNextcloudPlaceholderAttributes(path);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user