mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 21:46:03 +03:00
Fix/cleanup PropagateLocalMkDir::start()
This commit is contained in:
parent
ed19107161
commit
b995cd318c
1 changed files with 6 additions and 5 deletions
|
@ -104,15 +104,16 @@ void PropagateLocalMkdir::start()
|
|||
if (_propagator->_abortRequested.fetchAndAddRelaxed(0))
|
||||
return;
|
||||
|
||||
QDir newDir( _propagator->_localDir + _item._file );
|
||||
QDir newDir(_propagator->_localDir + _item._file);
|
||||
QString newDirStr = QDir::toNativeSeparators(newDir.path());
|
||||
if(newDir.exists()) {
|
||||
qDebug() << "WARN: new directory to create locally already exists!";
|
||||
done( SyncFileItem::NormalError, tr("Attention, possible case sensitivity clash with %1").arg(newDirName) );
|
||||
done( SyncFileItem::NormalError, tr("Attention, possible case sensitivity clash with %1").arg(newDirStr) );
|
||||
return;
|
||||
}
|
||||
QDir d;
|
||||
if (!d.mkpath( newDirName )) {
|
||||
done( SyncFileItem::NormalError, tr("could not create directory %1").arg(newDirName) );
|
||||
QDir localDir(_propagator->_localDir);
|
||||
if (!localDir.mkpath(_item._file)) {
|
||||
done( SyncFileItem::NormalError, tr("could not create directory %1").arg(newDirStr) );
|
||||
return;
|
||||
}
|
||||
done(SyncFileItem::Success);
|
||||
|
|
Loading…
Reference in a new issue