Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/dfm-io/dfm-io/denumerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,10 @@ QUrl DEnumeratorPrivate::buildUrl(const QUrl &url, const char *fileName)
QString dirPath = url.path();
path = dirPath.endsWith('/') ? dirPath + QString(fileName) : dirPath + "/" + QString(fileName);
}
QUrl nextUrl = QUrl::fromLocalFile(path);

// 保留原始 URL 的 scheme 和 host,而不是假定为本地文件
QUrl nextUrl = url;
nextUrl.setPath(path);

if (url.userInfo().startsWith("originPath::")) {
nextUrl.setUserInfo(url.userInfo() + QString::fromLatin1("/") + QString::fromLatin1(fileName));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@
bool isPathBlacklisted(const QString &inputPath, const QStringList &blacklistEntries)
{
const QString normalizedPath = normalizePathForBlacklistMatch(inputPath);
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
const QStringList pathSegments = normalizedPath.split('/', Qt::SkipEmptyParts);

#else
const QStringList pathSegments = normalizedPath.split('/', QString::SkipEmptyParts);
#endif
for (const QString &entry : blacklistEntries) {

Check warning on line 39 in src/dfm-search/dfm-search-lib/utils/filenameblacklistmatcher.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Consider using std::any_of algorithm instead of a raw loop.

Check warning on line 39 in src/dfm-search/dfm-search-lib/utils/filenameblacklistmatcher.cpp

View workflow job for this annotation

GitHub Actions / static-check / static-check

Consider using std::any_of algorithm instead of a raw loop.
const QString trimmedEntry = entry.trimmed();
if (trimmedEntry.isEmpty()) {
continue;
Expand Down
Loading