Skip to content

Commit 203d828

Browse files
GongHeng2017deepin-bot[bot]
authored andcommitted
Fix: [fileinfo] Can not delete file in trash.
-- The path error in trash, so can not delete it. Log: fix issue Bug: https://pms.uniontech.com/bug-view-352359.htm
1 parent 8462fcc commit 203d828

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/dfm-io/dfm-io/denumerator.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,9 @@ QUrl DEnumeratorPrivate::buildUrl(const QUrl &url, const char *fileName)
389389
path = dirPath.endsWith('/') ? dirPath + QString(fileName) : dirPath + "/" + QString(fileName);
390390
}
391391

392-
QUrl nextUrl = QUrl::fromLocalFile(path);
392+
// 保留原始 URL 的 scheme 和 host,而不是假定为本地文件
393+
QUrl nextUrl = url;
394+
nextUrl.setPath(path);
393395

394396
if (url.userInfo().startsWith("originPath::")) {
395397
nextUrl.setUserInfo(url.userInfo() + QString::fromLatin1("/") + QString::fromLatin1(fileName));

0 commit comments

Comments
 (0)