[network/kdeconnect-kde] plugins/share: Protect from creation/modification timestamps being 0
Albert Vaca Cintora <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit f9674f3c983959e3f1af6c337e47ff024c0b0640 by Albert Vaca Cintora.
Committed on 25/07/2026 at 10:37.
Pushed by albertvaka into branch 'master'.
Protect from creation/modification timestamps being 0
BUG: 523078
M +6 -0 plugins/share/shareplugin.cpp
https://invent.kde.org/network/kdeconnect-kde/-/commit/f9674f3c983959e3f1af6c337e47ff024c0b0640
diff --git a/plugins/share/shareplugin.cpp b/plugins/share/shareplugin.cpp
index ca65e48f6..8ce9af22a 100644
--- a/plugins/share/shareplugin.cpp
+++ b/plugins/share/shareplugin.cpp
@@ -71,6 +71,9 @@ static QString cleanFilename(const QString &filename)
void SharePlugin::setDateModified(const QUrl &destination, const qint64 timestamp)
{
+ if (timestamp == 0) {
+ return;
+ }
QFile receivedFile(destination.toLocalFile());
if (!receivedFile.exists() || !receivedFile.open(QIODevice::ReadWrite)) {
return;
@@ -80,6 +83,9 @@ void SharePlugin::setDateModified(const QUrl &destination, const qint64 timestam
void SharePlugin::setDateCreated(const QUrl &destination, const qint64 timestamp)
{
+ if (timestamp == 0) {
+ return;
+ }
QFile receivedFile(destination.toLocalFile());
if (!receivedFile.exists() || !receivedFile.open(QIODevice::ReadWrite)) {
return;