mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 23:28:14 +03:00
Swap folder nullness assert for return
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
c1b2e07e8c
commit
d6125ca3a1
1 changed files with 5 additions and 1 deletions
|
@ -62,7 +62,11 @@ void FileDetails::setLocalPath(const QString &localPath)
|
|||
connect(&_fileWatcher, &QFileSystemWatcher::fileChanged, this, &FileDetails::refreshFileDetails);
|
||||
|
||||
const auto folder = FolderMan::instance()->folderForPath(_localPath);
|
||||
Q_ASSERT(folder);
|
||||
if (!folder) {
|
||||
qCWarning(lcFileDetails) << "No folder found for path:" << _localPath << "will not load file details.";
|
||||
return;
|
||||
}
|
||||
|
||||
const auto file = _localPath.mid(folder->cleanPath().length() + 1);
|
||||
|
||||
if (!folder->journalDb()->getFileRecord(file, &_fileRecord)) {
|
||||
|
|
Loading…
Reference in a new issue