mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 06:55:59 +03:00
Do not close putmultifilejob devices if not open, log when they are not open
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
35b05fca85
commit
651615ce94
1 changed files with 11 additions and 4 deletions
|
@ -71,15 +71,22 @@ void PutMultiFileJob::start()
|
|||
|
||||
bool PutMultiFileJob::finished()
|
||||
{
|
||||
for(const auto &oneDevice : _devices) {
|
||||
oneDevice._device->close();
|
||||
}
|
||||
|
||||
qCInfo(lcPutMultiFileJob) << "POST of" << reply()->request().url().toString() << path() << "FINISHED WITH STATUS"
|
||||
<< replyStatusString()
|
||||
<< reply()->attribute(QNetworkRequest::HttpStatusCodeAttribute)
|
||||
<< reply()->attribute(QNetworkRequest::HttpReasonPhraseAttribute);
|
||||
|
||||
for(const auto &oneDevice : _devices) {
|
||||
Q_ASSERT(oneDevice._device);
|
||||
|
||||
if (oneDevice._device->isOpen()) {
|
||||
oneDevice._device->close();
|
||||
} else {
|
||||
qCWarning(lcPutMultiFileJob) << "Did not close device" << oneDevice._device.get()
|
||||
<< "as it was not open";
|
||||
}
|
||||
}
|
||||
|
||||
emit finishedSignal();
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue