Skip to content

Commit 843f4de

Browse files
mgallienbackportbot[bot]
authored andcommitted
fix(upload): ensure we see a warning if we cannot read a file to upload
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
1 parent bd90731 commit 843f4de

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libsync/propagateupload.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
namespace OCC {
3737

3838
Q_LOGGING_CATEGORY(lcPutJob, "nextcloud.sync.networkjob.put", QtInfoMsg)
39+
Q_LOGGING_CATEGORY(lcUploadDevice, "nextcloud.sync.uploaddevice", QtInfoMsg)
3940
Q_LOGGING_CATEGORY(lcPollJob, "nextcloud.sync.networkjob.poll", QtInfoMsg)
4041
Q_LOGGING_CATEGORY(lcPropagateUpload, "nextcloud.sync.propagator.upload", QtInfoMsg)
4142
Q_LOGGING_CATEGORY(lcPropagateUploadV1, "nextcloud.sync.propagator.upload.v1", QtInfoMsg)
@@ -549,6 +550,7 @@ qint64 UploadDevice::readData(char *data, qint64 maxlen)
549550
setErrorString({});
550551
return c;
551552
} else if (c < 0) {
553+
qCWarning(lcUploadDevice) << _file.errorString() << c;
552554
setErrorString(_file.errorString());
553555
return -1;
554556
}

0 commit comments

Comments
 (0)