mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 09:30:13 +03:00
Merge pull request #319 from nextcloud/upstream/issue/4424
Folder: normalize the local path.
This commit is contained in:
commit
c49597d9d8
2 changed files with 5 additions and 2 deletions
|
@ -122,6 +122,10 @@ void Folder::checkLocalPath()
|
||||||
{
|
{
|
||||||
const QFileInfo fi(_definition.localPath);
|
const QFileInfo fi(_definition.localPath);
|
||||||
_canonicalLocalPath = fi.canonicalFilePath();
|
_canonicalLocalPath = fi.canonicalFilePath();
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
// Workaround QTBUG-55896 (Should be fixed in Qt 5.8)
|
||||||
|
_canonicalLocalPath = _canonicalLocalPath.normalized(QString::NormalizationForm_C);
|
||||||
|
#endif
|
||||||
if (_canonicalLocalPath.isEmpty()) {
|
if (_canonicalLocalPath.isEmpty()) {
|
||||||
qCWarning(lcFolder) << "Broken symlink:" << _definition.localPath;
|
qCWarning(lcFolder) << "Broken symlink:" << _definition.localPath;
|
||||||
_canonicalLocalPath = _definition.localPath;
|
_canonicalLocalPath = _definition.localPath;
|
||||||
|
|
|
@ -517,8 +517,7 @@ bool OwncloudPropagator::localFileNameClash(const QString &relFile)
|
||||||
re = false;
|
re = false;
|
||||||
qCWarning(lcPropagator) << "No valid fileinfo";
|
qCWarning(lcPropagator) << "No valid fileinfo";
|
||||||
} else {
|
} else {
|
||||||
// Need to normalize to composited form because of
|
// Need to normalize to composited form because of QTBUG-39622/QTBUG-55896
|
||||||
// https://bugreports.qt-project.org/browse/QTBUG-39622
|
|
||||||
const QString cName = fileInfo.canonicalFilePath().normalized(QString::NormalizationForm_C);
|
const QString cName = fileInfo.canonicalFilePath().normalized(QString::NormalizationForm_C);
|
||||||
bool equal = (file == cName);
|
bool equal = (file == cName);
|
||||||
re = (!equal && !cName.endsWith(relFile, Qt::CaseSensitive));
|
re = (!equal && !cName.endsWith(relFile, Qt::CaseSensitive));
|
||||||
|
|
Loading…
Reference in a new issue