Skip to content

Commit

Permalink
fix: Create new text in the SMB server, double-click to open the text…
Browse files Browse the repository at this point in the history
… editor and edit the text

The mimetype method for reading files is inconsistent, and the parameters passed in using openwithdialog are incorrect

Log: Create new text in the SMB server, double-click to open the text editor and edit the text
Bug: https://pms.uniontech.com/bug-view-267705.html
  • Loading branch information
liyigang1 committed Sep 2, 2024
1 parent ee568a1 commit 3c5fcb0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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 @@ -1046,7 +1046,7 @@ bool LocalFileHandlerPrivate::doOpenFiles(const QList<QUrl> &urls, const QString

QString mimeType;
if (Q_UNLIKELY(!filePath.contains("#")) && fileInfo && fileInfo->size() == 0 && fileInfo->exists()) {
mimeType = fileInfo->nameOf(NameInfoType::kMimeTypeName);
mimeType = fileInfo->fileMimeType().name();
} else {
mimeType = getFileMimetype(fileUrl);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ bool FileOperationsEventReceiver::handleOperationOpenFiles(const quint64 windowI
dpfSignalDispatcher->publish(DFMBASE_NAMESPACE::GlobalEventType::kMoveToTrash, windowId, fileHandler.getInvalidPath(), AbstractJobHandler::JobFlag::kNoHint, nullptr);
} else {
// deal open file with custom dialog
dpfSlotChannel->push("dfmplugin_utils", "slot_OpenWith_ShowDialog", windowId, fileHandler.getInvalidPath());
dpfSlotChannel->push("dfmplugin_utils", "slot_OpenWith_ShowDialog", windowId, urls);
ok = true;
}
}
Expand Down

0 comments on commit 3c5fcb0

Please sign in to comment.