parallel chunk upload: allow "true" for the value of OWNCLOUD_PARALLEL_CHUNK

This commit is contained in:
Olivier Goffart 2014-09-18 14:29:38 +02:00
parent 1b62ed1e7e
commit 7c36e5c0e6

View file

@ -326,7 +326,8 @@ void PropagateUploadFileQNAM::startNextChunk()
_propagator->_activeJobs++; _propagator->_activeJobs++;
_currentChunk++; _currentChunk++;
bool parallelChunkUpload = qgetenv("OWNCLOUD_PARALLEL_CHUNK").toInt() > 0; QByteArray env = qgetenv("OWNCLOUD_PARALLEL_CHUNK");
bool parallelChunkUpload = env=="true" || env =="1";;
if (_currentChunk + _startChunk >= _chunkCount - 1) { if (_currentChunk + _startChunk >= _chunkCount - 1) {
// Don't do parallel upload of chunk if this might be the last chunk because the server cannot handle that // Don't do parallel upload of chunk if this might be the last chunk because the server cannot handle that
// https://github.com/owncloud/core/issues/11106 // https://github.com/owncloud/core/issues/11106