Diffusion KIO 5e791ef216c2

[copyjob] Only set modification time if the kio-slave provided it

Authored by wbauer on Jun 21 2019, 1:30 PM.

Description

[copyjob] Only set modification time if the kio-slave provided it

If the slave didn't pass a modification time (e.g. the http slave
doesn't), it was set to -1, resulting in setting a wrong modification
time for the destination file in copyNextFile() later on because that
case wasn't checked.

So only set info.mtime when the slave actually provided a value.

There's no need for further checks later in copyNextFile() (where
FileCopyJob::setModificationTime() is called) because FileCopyJob checks
for validity anyway.

BUG: 374420
FIXED-IN: 5.60.0
Differential Revision: https://phabricator.kde.org/D21955