mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-23 12:55:44 +03:00
avoid accessing a temp QString via QStringView after it is deleted
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
parent
62661b7a0b
commit
ba00c50022
1 changed files with 2 additions and 2 deletions
|
@ -134,9 +134,9 @@ static CSYNC_EXCLUDE_TYPE _csync_excluded_common(const QString &path, bool exclu
|
|||
{
|
||||
/* split up the path */
|
||||
QStringView bname(path);
|
||||
int lastSlash = path.lastIndexOf(QLatin1Char('/'));
|
||||
int lastSlash = bname.lastIndexOf(QLatin1Char('/'));
|
||||
if (lastSlash >= 0) {
|
||||
bname = path.mid(lastSlash + 1);
|
||||
bname = bname.mid(lastSlash + 1);
|
||||
}
|
||||
|
||||
qsizetype blen = bname.size();
|
||||
|
|
Loading…
Reference in a new issue