mirror of
https://github.com/chylex/Nextcloud-Desktop.git
synced 2026-04-05 05:34:18 +02:00
Compare commits
8 Commits
v1.6.2-rc1
...
v1.6.2-rc2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f84e0010ee | ||
|
|
c97f46d403 | ||
|
|
1fb52f0d8b | ||
|
|
d4de024f15 | ||
|
|
1d9d88ca85 | ||
|
|
beb9300b4e | ||
|
|
c35880d4f1 | ||
|
|
d8ebebaf12 |
@@ -1,6 +1,11 @@
|
|||||||
ChangeLog
|
ChangeLog
|
||||||
=========
|
=========
|
||||||
version 1.6.2 (release 2014-07-x )
|
version 1.6.2 (release 2014-07-x )
|
||||||
|
* Another small mem leak fixed in HTTP Credentials.
|
||||||
|
* Fix local file name clash detection for MacOSX.
|
||||||
|
* Limit maximum wait time to ten seconds in network limiting.
|
||||||
|
* Fix data corruption while trying to resume and the server does
|
||||||
|
not support it.
|
||||||
* HTTP Credentials: Read password from legacy place if not found.
|
* HTTP Credentials: Read password from legacy place if not found.
|
||||||
* Shibboleth: Fix the waiting curser that would not disapear (#1915)
|
* Shibboleth: Fix the waiting curser that would not disapear (#1915)
|
||||||
* Limit memory usage to avoid mem wasting and crashes
|
* Limit memory usage to avoid mem wasting and crashes
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ set( MIRALL_VERSION_PATCH 2 )
|
|||||||
set( MIRALL_SOVERSION 0 )
|
set( MIRALL_SOVERSION 0 )
|
||||||
|
|
||||||
if ( NOT DEFINED MIRALL_VERSION_SUFFIX )
|
if ( NOT DEFINED MIRALL_VERSION_SUFFIX )
|
||||||
set( MIRALL_VERSION_SUFFIX "rc1") #e.g. beta1, beta2, rc1
|
set( MIRALL_VERSION_SUFFIX "rc2") #e.g. beta1, beta2, rc1
|
||||||
endif( NOT DEFINED MIRALL_VERSION_SUFFIX )
|
endif( NOT DEFINED MIRALL_VERSION_SUFFIX )
|
||||||
|
|
||||||
if( NOT DEFINED MIRALL_VERSION_BUILD )
|
if( NOT DEFINED MIRALL_VERSION_BUILD )
|
||||||
|
|||||||
@@ -111,8 +111,8 @@ ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
|
|||||||
!define MUI_HEADERIMAGE
|
!define MUI_HEADERIMAGE
|
||||||
!define MUI_HEADERIMAGE_BITMAP ${WIN_SETUP_BITMAP_PATH}/page_header.bmp
|
!define MUI_HEADERIMAGE_BITMAP ${WIN_SETUP_BITMAP_PATH}/page_header.bmp
|
||||||
!define MUI_COMPONENTSPAGE_SMALLDESC
|
!define MUI_COMPONENTSPAGE_SMALLDESC
|
||||||
!define MUI_FINISHPAGE_LINK "www.${APPLICATION_DOMAIN}"
|
!define MUI_FINISHPAGE_LINK "${APPLICATION_DOMAIN}"
|
||||||
!define MUI_FINISHPAGE_LINK_LOCATION "http://www.${APPLICATION_DOMAIN}"
|
!define MUI_FINISHPAGE_LINK_LOCATION "http://${APPLICATION_DOMAIN}"
|
||||||
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
|
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
|
||||||
!ifdef OPTION_FINISHPAGE_RELEASE_NOTES
|
!ifdef OPTION_FINISHPAGE_RELEASE_NOTES
|
||||||
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
|
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
|
||||||
@@ -414,9 +414,9 @@ Section "${APPLICATION_NAME}" SEC_APPLICATION
|
|||||||
|
|
||||||
;Qt deps
|
;Qt deps
|
||||||
File "${MING_BIN}\libpng16-16.dll"
|
File "${MING_BIN}\libpng16-16.dll"
|
||||||
File "${MING_BIN}\icudata51.dll"
|
File "${MING_BIN}\icudata53.dll"
|
||||||
File "${MING_BIN}\icui18n51.dll"
|
File "${MING_BIN}\icui18n53.dll"
|
||||||
File "${MING_BIN}\icuuc51.dll"
|
File "${MING_BIN}\icuuc53.dll"
|
||||||
File "${MING_BIN}\libEGL.dll"
|
File "${MING_BIN}\libEGL.dll"
|
||||||
File "${MING_BIN}\libGLESv2.dll"
|
File "${MING_BIN}\libGLESv2.dll"
|
||||||
File "${MING_BIN}\libjpeg-8.dll"
|
File "${MING_BIN}\libjpeg-8.dll"
|
||||||
|
|||||||
Submodule doc/ocdoc updated: 2c3e584b23...c612df399e
@@ -366,6 +366,8 @@ void HttpCredentials::slotWriteJobDone(QKeychain::Job *job)
|
|||||||
default:
|
default:
|
||||||
qDebug() << "Error while writing password" << job->errorString();
|
qDebug() << "Error while writing password" << job->errorString();
|
||||||
}
|
}
|
||||||
|
WritePasswordJob *wjob = qobject_cast<WritePasswordJob*>(job);
|
||||||
|
wjob->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HttpCredentials::slotAuthentication(QNetworkReply* reply, QAuthenticator* authenticator)
|
void HttpCredentials::slotAuthentication(QNetworkReply* reply, QAuthenticator* authenticator)
|
||||||
|
|||||||
@@ -337,8 +337,15 @@ bool OwncloudPropagator::localFileNameClash( const QString& relFile )
|
|||||||
QFileInfo fileInfo(file);
|
QFileInfo fileInfo(file);
|
||||||
if (!fileInfo.exists()) {
|
if (!fileInfo.exists()) {
|
||||||
re = false;
|
re = false;
|
||||||
|
qDebug() << Q_FUNC_INFO << "No valid fileinfo";
|
||||||
} else {
|
} else {
|
||||||
re = ( ! fileInfo.canonicalFilePath().endsWith(relFile, Qt::CaseSensitive) );
|
// Need to normalize to composited form because of
|
||||||
|
// https://bugreports.qt-project.org/browse/QTBUG-39622
|
||||||
|
const QString cName = fileInfo.canonicalFilePath().normalized(QString::NormalizationForm_C);
|
||||||
|
// qDebug() << Q_FUNC_INFO << "comparing " << cName << " with " << file;
|
||||||
|
bool equal = (file == cName);
|
||||||
|
re = (!equal && ! cName.endsWith(relFile, Qt::CaseSensitive) );
|
||||||
|
// qDebug() << Q_FUNC_INFO << "Returning for localFileNameClash: " << re;
|
||||||
}
|
}
|
||||||
#elif defined(Q_OS_WIN)
|
#elif defined(Q_OS_WIN)
|
||||||
const QString file( _localDir + relFile );
|
const QString file( _localDir + relFile );
|
||||||
|
|||||||
@@ -144,6 +144,8 @@ void OwncloudSetupWizard::slotDetermineAuthType(const QString &urlString)
|
|||||||
}
|
}
|
||||||
Account *account = _ocWizard->account();
|
Account *account = _ocWizard->account();
|
||||||
account->setUrl(url);
|
account->setUrl(url);
|
||||||
|
// Set fake credentials beforfe we check what credidential it actually is.
|
||||||
|
account->setCredentials(CredentialsFactory::create("dummy"));
|
||||||
CheckServerJob *job = new CheckServerJob(_ocWizard->account(), false, this);
|
CheckServerJob *job = new CheckServerJob(_ocWizard->account(), false, this);
|
||||||
job->setIgnoreCredentialFailure(true);
|
job->setIgnoreCredentialFailure(true);
|
||||||
connect(job, SIGNAL(instanceFound(QUrl,QVariantMap)), SLOT(slotOwnCloudFoundAuth(QUrl,QVariantMap)));
|
connect(job, SIGNAL(instanceFound(QUrl,QVariantMap)), SLOT(slotOwnCloudFoundAuth(QUrl,QVariantMap)));
|
||||||
|
|||||||
@@ -328,8 +328,7 @@ void PropagateNeonJob::limitBandwidth(qint64 progress, qint64 bandwidth_limit)
|
|||||||
// -bandwidth_limit is the % of bandwidth
|
// -bandwidth_limit is the % of bandwidth
|
||||||
int64_t wait_time = -diff * (1 + 100.0 / bandwidth_limit);
|
int64_t wait_time = -diff * (1 + 100.0 / bandwidth_limit);
|
||||||
if (wait_time > 0) {
|
if (wait_time > 0) {
|
||||||
Mirall::Utility::usleep(wait_time);
|
Mirall::Utility::usleep(qMin(wait_time, int64_t(1000000*10)));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_lastTime.start();
|
_lastTime.start();
|
||||||
@@ -397,24 +396,39 @@ void PropagateDownloadFileLegacy::install_content_reader( ne_request *req, void
|
|||||||
|
|
||||||
if (etag.isEmpty()) {
|
if (etag.isEmpty()) {
|
||||||
qDebug() << Q_FUNC_INFO << "No E-Tag reply by server, considering it invalid" << ne_get_response_header(req, "etag");
|
qDebug() << Q_FUNC_INFO << "No E-Tag reply by server, considering it invalid" << ne_get_response_header(req, "etag");
|
||||||
that->errorString = tr("No E-Tag received from server, check Proxy/Gateway");
|
that->abortTransfer(req, tr("No E-Tag received from server, check Proxy/Gateway"));
|
||||||
ne_set_error(that->_propagator->_session, "%s", that->errorString.toUtf8().data());
|
|
||||||
ne_add_response_body_reader( req, do_not_accept,
|
|
||||||
do_not_download_content_reader,
|
|
||||||
(void*) that );
|
|
||||||
return;
|
return;
|
||||||
} else if (!that->_expectedEtagForResume.isEmpty() && that->_expectedEtagForResume != etag) {
|
} else if (!that->_expectedEtagForResume.isEmpty() && that->_expectedEtagForResume != etag) {
|
||||||
qDebug() << Q_FUNC_INFO << "We received a different E-Tag for resuming!"
|
qDebug() << Q_FUNC_INFO << "We received a different E-Tag for resuming!"
|
||||||
<< QString::fromLatin1(that->_expectedEtagForResume.data()) << "vs"
|
<< QString::fromLatin1(that->_expectedEtagForResume.data()) << "vs"
|
||||||
<< QString::fromLatin1(etag.data());
|
<< QString::fromLatin1(etag.data());
|
||||||
that->errorString = tr("We received a different E-Tag for resuming. Retrying next time.");
|
that->abortTransfer(req, tr("We received a different E-Tag for resuming. Retrying next time."));
|
||||||
ne_set_error(that->_propagator->_session, "%s", that->errorString.toUtf8().data());
|
|
||||||
ne_add_response_body_reader( req, do_not_accept,
|
|
||||||
do_not_download_content_reader,
|
|
||||||
(void*) that );
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
quint64 start = 0;
|
||||||
|
QByteArray ranges = ne_get_response_header(req, "content-range");
|
||||||
|
if (!ranges.isEmpty()) {
|
||||||
|
QRegExp rx("bytes (\\d+)-");
|
||||||
|
if (rx.indexIn(ranges) >= 0) {
|
||||||
|
start = rx.cap(1).toULongLong();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (start != that->_resumeStart) {
|
||||||
|
qDebug() << Q_FUNC_INFO << "Wrong content-range: "<< ranges << " while expecting start was" << that->_resumeStart;
|
||||||
|
if (start == 0) {
|
||||||
|
// device don't support range, just stry again from scratch
|
||||||
|
that->_file->close();
|
||||||
|
if (!that->_file->open(QIODevice::WriteOnly)) {
|
||||||
|
that->abortTransfer(req, that->_file->errorString());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
that->abortTransfer(req, tr("Server returned wrong content-range"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const char *enc = ne_get_response_header( req, "Content-Encoding" );
|
const char *enc = ne_get_response_header( req, "Content-Encoding" );
|
||||||
qDebug("Content encoding ist <%s> with status %d", enc ? enc : "empty",
|
qDebug("Content encoding ist <%s> with status %d", enc ? enc : "empty",
|
||||||
@@ -431,6 +445,16 @@ void PropagateDownloadFileLegacy::install_content_reader( ne_request *req, void
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PropagateDownloadFileLegacy::abortTransfer(ne_request* req, const QString& error)
|
||||||
|
{
|
||||||
|
errorString = error;
|
||||||
|
ne_set_error(_propagator->_session, "%s", errorString.toUtf8().data());
|
||||||
|
ne_add_response_body_reader( req, do_not_accept,
|
||||||
|
do_not_download_content_reader,
|
||||||
|
this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void PropagateDownloadFileLegacy::notify_status_cb(void* userdata, ne_session_status status,
|
void PropagateDownloadFileLegacy::notify_status_cb(void* userdata, ne_session_status status,
|
||||||
const ne_session_status_info* info)
|
const ne_session_status_info* info)
|
||||||
{
|
{
|
||||||
@@ -521,6 +545,7 @@ void PropagateDownloadFileLegacy::start()
|
|||||||
ne_add_request_header(req.data(), "Range", rangeRequest.constData());
|
ne_add_request_header(req.data(), "Range", rangeRequest.constData());
|
||||||
ne_add_request_header(req.data(), "Accept-Ranges", "bytes");
|
ne_add_request_header(req.data(), "Accept-Ranges", "bytes");
|
||||||
qDebug() << "Retry with range " << rangeRequest;
|
qDebug() << "Retry with range " << rangeRequest;
|
||||||
|
_resumeStart = done;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* hook called before the content is parsed to set the correct reader,
|
/* hook called before the content is parsed to set the correct reader,
|
||||||
|
|||||||
@@ -53,13 +53,14 @@ class PropagateDownloadFileLegacy: public PropagateNeonJob {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit PropagateDownloadFileLegacy(OwncloudPropagator* propagator,const SyncFileItem& item)
|
explicit PropagateDownloadFileLegacy(OwncloudPropagator* propagator,const SyncFileItem& item)
|
||||||
: PropagateNeonJob(propagator, item), _file(0) {}
|
: PropagateNeonJob(propagator, item), _file(0), _resumeStart(0) {}
|
||||||
void start();
|
void start();
|
||||||
private:
|
private:
|
||||||
QFile *_file;
|
QFile *_file;
|
||||||
QScopedPointer<ne_decompress, ScopedPointerHelpers> _decompress;
|
QScopedPointer<ne_decompress, ScopedPointerHelpers> _decompress;
|
||||||
QString errorString;
|
QString errorString;
|
||||||
QByteArray _expectedEtagForResume;
|
QByteArray _expectedEtagForResume;
|
||||||
|
quint64 _resumeStart;
|
||||||
|
|
||||||
static int do_not_accept (void *userdata, ne_request *req, const ne_status *st)
|
static int do_not_accept (void *userdata, ne_request *req, const ne_status *st)
|
||||||
{
|
{
|
||||||
@@ -78,6 +79,9 @@ private:
|
|||||||
static void install_content_reader( ne_request *req, void *userdata, const ne_status *status );
|
static void install_content_reader( ne_request *req, void *userdata, const ne_status *status );
|
||||||
static void notify_status_cb(void* userdata, ne_session_status status,
|
static void notify_status_cb(void* userdata, ne_session_status status,
|
||||||
const ne_session_status_info* info);
|
const ne_session_status_info* info);
|
||||||
|
|
||||||
|
/** To be called from install_content_reader if we want to abort the transfer */
|
||||||
|
void abortTransfer(ne_request *req, const QString &error);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -438,6 +438,34 @@ void GETFileJob::slotMetaDataChanged()
|
|||||||
reply()->abort();
|
reply()->abort();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
quint64 start = 0;
|
||||||
|
QByteArray ranges = parseEtag(reply()->rawHeader("Content-Range"));
|
||||||
|
if (!ranges.isEmpty()) {
|
||||||
|
QRegExp rx("bytes (\\d+)-");
|
||||||
|
if (rx.indexIn(ranges) >= 0) {
|
||||||
|
start = rx.cap(1).toULongLong();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (start != _resumeStart) {
|
||||||
|
qDebug() << Q_FUNC_INFO << "Wrong content-range: "<< ranges << " while expecting start was" << _resumeStart;
|
||||||
|
if (start == 0) {
|
||||||
|
// device don't support range, just stry again from scratch
|
||||||
|
_device->close();
|
||||||
|
if (!_device->open(QIODevice::WriteOnly)) {
|
||||||
|
_errorString = _device->errorString();
|
||||||
|
_errorStatus = SyncFileItem::NormalError;
|
||||||
|
reply()->abort();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
_errorString = tr("Server returned wrong content-range");
|
||||||
|
_errorStatus = SyncFileItem::NormalError;
|
||||||
|
reply()->abort();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GETFileJob::slotReadyRead()
|
void GETFileJob::slotReadyRead()
|
||||||
@@ -544,7 +572,7 @@ void PropagateDownloadFileQNAM::start()
|
|||||||
|
|
||||||
_job = new GETFileJob(AccountManager::instance()->account(),
|
_job = new GETFileJob(AccountManager::instance()->account(),
|
||||||
_propagator->_remoteFolder + _item._file,
|
_propagator->_remoteFolder + _item._file,
|
||||||
&_tmpFile, headers, expectedEtagForResume);
|
&_tmpFile, headers, expectedEtagForResume, _startSize);
|
||||||
_job->setTimeout(_propagator->httpTimeout() * 1000);
|
_job->setTimeout(_propagator->httpTimeout() * 1000);
|
||||||
connect(_job, SIGNAL(finishedSignal()), this, SLOT(slotGetFinished()));
|
connect(_job, SIGNAL(finishedSignal()), this, SLOT(slotGetFinished()));
|
||||||
connect(_job, SIGNAL(downloadProgress(qint64,qint64)), this, SLOT(slotDownloadProgress(qint64,qint64)));
|
connect(_job, SIGNAL(downloadProgress(qint64,qint64)), this, SLOT(slotDownloadProgress(qint64,qint64)));
|
||||||
|
|||||||
@@ -105,20 +105,21 @@ private slots:
|
|||||||
|
|
||||||
class GETFileJob : public AbstractNetworkJob {
|
class GETFileJob : public AbstractNetworkJob {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
QIODevice* _device;
|
QFile* _device;
|
||||||
QMap<QByteArray, QByteArray> _headers;
|
QMap<QByteArray, QByteArray> _headers;
|
||||||
QString _errorString;
|
QString _errorString;
|
||||||
QByteArray _expectedEtagForResume;
|
QByteArray _expectedEtagForResume;
|
||||||
|
quint64 _resumeStart;
|
||||||
SyncFileItem::Status _errorStatus;
|
SyncFileItem::Status _errorStatus;
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// DOES NOT take owncership of the device.
|
// DOES NOT take owncership of the device.
|
||||||
explicit GETFileJob(Account* account, const QString& path, QIODevice *device,
|
explicit GETFileJob(Account* account, const QString& path, QFile *device,
|
||||||
const QMap<QByteArray, QByteArray> &headers, QByteArray expectedEtagForResume,
|
const QMap<QByteArray, QByteArray> &headers, QByteArray expectedEtagForResume,
|
||||||
QObject* parent = 0)
|
quint64 resumeStart, QObject* parent = 0)
|
||||||
: AbstractNetworkJob(account, path, parent),
|
: AbstractNetworkJob(account, path, parent),
|
||||||
_device(device), _headers(headers), _expectedEtagForResume(expectedEtagForResume),
|
_device(device), _headers(headers), _expectedEtagForResume(expectedEtagForResume),
|
||||||
_errorStatus(SyncFileItem::NoStatus) {}
|
_resumeStart(resumeStart), _errorStatus(SyncFileItem::NoStatus) {}
|
||||||
|
|
||||||
virtual void start();
|
virtual void start();
|
||||||
virtual bool finished() {
|
virtual bool finished() {
|
||||||
|
|||||||
Reference in New Issue
Block a user