]> dgit.raspbian.org Git - nextcloud-desktop.git/commitdiff
in automated tests, update modtime when modifying the content of a file
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Wed, 16 Oct 2024 11:12:43 +0000 (13:12 +0200)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Thu, 17 Oct 2024 07:45:57 +0000 (09:45 +0200)
why one would not update the modification time when modifying a remote
file during automated tests

there is no reason to not update the modification time as this is what
is done by the server

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
test/syncenginetestutils.cpp

index 6c01bf29cab8ade7f0ca1873e6dd72f98de03b71..7c8d4eabcddd34563da33776bf2dcbaf4b12b908 100644 (file)
@@ -178,6 +178,7 @@ void FileInfo::setContents(const QString &relativePath, char contentChar)
     FileInfo *file = findInvalidatingEtags(relativePath);
     Q_ASSERT(file);
     file->contentChar = contentChar;
+    file->lastModified = QDateTime::currentDateTimeUtc();
 }
 
 void FileInfo::appendByte(const QString &relativePath)