Skip to content

Commit

Permalink
fix: fix findMountPointByPath crash
Browse files Browse the repository at this point in the history
As title.

Log: fix deepin-anything-server crash.
Task: https://pms.uniontech.com/task-view-358761.html
  • Loading branch information
wangrong1069 committed Aug 22, 2024
1 parent 06930d0 commit 24b3258
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/backend/lib/mountcacher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ QString MountCacher::findMountPointByPath(const QString &path, bool hardreal)
QString result_path = path;

Q_FOREVER {
char *checkpath = QFile::encodeName(result_path).data();
char *mount_point = mnt_get_mountpoint(checkpath);
QByteArray checkpath = QFile::encodeName(result_path);
char *mount_point = mnt_get_mountpoint(checkpath.data());
if (nullptr != mount_point) {
// nDebug() << path << " mountpoint: " << mount_point;
result = QString(mount_point);
Expand Down

0 comments on commit 24b3258

Please sign in to comment.