Skip to content

Commit

Permalink
fix: Copying a directory will cause the soft connection to point to a…
Browse files Browse the repository at this point in the history
…n absolute path

Read the link file's pointing path as the new link's pointing path

Log: Copying a directory will cause the soft connection to point to an absolute path
Bug: https://bbs.deepin.org/post/279799
  • Loading branch information
liyigang1 authored and deepin-bot[bot] committed Oct 11, 2024
1 parent f0071dd commit 7c9aab5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,8 @@ bool FileOperateBaseWorker::createSystemLink(const DFileInfoPointer &fromInfo, c

do {
actionForlink = AbstractJobHandler::SupportAction::kNoAction;
if (localFileHandler->createSystemLink(newFromInfo->uri(), toInfo->uri())) {
auto target = QUrl::fromLocalFile(newFromInfo->attribute(DFileInfo::AttributeID::kStandardSymlinkTarget).toString());
if (localFileHandler->createSystemLink(target, toInfo->uri())) {
return true;
}
actionForlink = doHandleErrorAndWait(fromInfo->uri(), toInfo->uri(),
Expand Down

0 comments on commit 7c9aab5

Please sign in to comment.