mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 13:35:58 +03:00
It was surprising to have a broken symlink return empty for canonical path.
This commit is contained in:
parent
b7809ded23
commit
aa5d3055be
1 changed files with 4 additions and 2 deletions
|
@ -123,9 +123,11 @@ Folder::~Folder()
|
|||
void Folder::checkLocalPath()
|
||||
{
|
||||
const QFileInfo fi(_definition.localPath);
|
||||
|
||||
_canonicalLocalPath = fi.canonicalFilePath();
|
||||
if( !_canonicalLocalPath.endsWith('/') ) {
|
||||
if (_canonicalLocalPath.isEmpty()) {
|
||||
qDebug() << "Broken symlink:" << _definition.localPath;
|
||||
_canonicalLocalPath = _definition.localPath;
|
||||
} else if( !_canonicalLocalPath.endsWith('/') ) {
|
||||
_canonicalLocalPath.append('/');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue