Skip to content

Commit

Permalink
fix: Refreshing remote directory after network outage caused document…
Browse files Browse the repository at this point in the history
… management to freeze

Check if remote access is available once during refresh

Log: Refreshing remote directory after network outage caused document management to freeze
  • Loading branch information
liyigang1 committed Jul 4, 2024
1 parent 2a675ac commit e44919b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/dfm-base/dialogs/taskdialog/taskwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ void TaskWidget::leaveEvent(QEvent *event)
{
onMouseHover(false);

return QWidget::enterEvent(event);
return QWidget::leaveEvent(event);
}

void TaskWidget::paintEvent(QPaintEvent *event)
Expand Down
2 changes: 1 addition & 1 deletion src/dfm-base/file/local/localfilehandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,7 @@ bool LocalFileHandlerPrivate::doOpenFiles(const QList<QUrl> &urls, const QString

bool openResult = doOpenFiles(openInfos, openMineTypes);

bool openMount = doOpenFiles(mountOpenInfos, openMineTypes);
bool openMount = doOpenFiles(mountOpenInfos, mountOpenInfos);

bool openCmd = doOpenFiles(cmdOpenInfos, cmdOpenInfos);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ RootInfo::~RootInfo()
for (const auto &thread : discardedThread) {
thread->disconnect();
thread->stop();
thread->wait();
thread->exit();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,10 @@ QList<QUrl> FileView::selectedUrlList() const

void FileView::refresh()
{
if (NetworkUtils::instance()->checkFtpOrSmbBusy(rootUrl())) {
DialogManager::instance()->showUnableToVistDir(rootUrl().path());
return;
}
model()->refresh();
}

Expand Down

0 comments on commit e44919b

Please sign in to comment.