mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-24 13:25:52 +03:00
Check for case clash on downloads.
This commit is contained in:
parent
57359968ed
commit
bbdf7bf955
1 changed files with 8 additions and 2 deletions
|
@ -22,6 +22,7 @@
|
|||
#include "propagatorjobs.h"
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QFileInfo>
|
||||
#include <QDir>
|
||||
#include <cmath>
|
||||
|
||||
namespace Mirall {
|
||||
|
@ -430,8 +431,6 @@ void GETFileJob::slotReadyRead()
|
|||
resetTimeout();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void PropagateDownloadFileQNAM::start()
|
||||
{
|
||||
if (_propagator->_abortRequested.fetchAndAddRelaxed(0))
|
||||
|
@ -439,6 +438,13 @@ void PropagateDownloadFileQNAM::start()
|
|||
|
||||
qDebug() << Q_FUNC_INFO << _item._file << _propagator->_activeJobs;
|
||||
|
||||
// do a case clash check.
|
||||
if( Utility::fsCasePreserving() && _propagator->localFileNameClash(_item._file) ) {
|
||||
done( SyncFileItem::NormalError, tr("File %1 can not be downloaded because of a local file name clash!")
|
||||
.arg(QDir::toNativeSeparators(_item._file)) );
|
||||
return;
|
||||
}
|
||||
|
||||
emit progress(_item, 0);
|
||||
|
||||
QString tmpFileName;
|
||||
|
|
Loading…
Reference in a new issue