diff --git a/interfaces/innerkits/native/file_share/src/file_share.cpp b/interfaces/innerkits/native/file_share/src/file_share.cpp index be352eafdb10ce85c32638be6247ad42cdabe2d6..8ca1ba61e5ba4b5874ba460e198381a5cf6881cd 100644 --- a/interfaces/innerkits/native/file_share/src/file_share.cpp +++ b/interfaces/innerkits/native/file_share/src/file_share.cpp @@ -116,6 +116,7 @@ static int32_t GetLowerPath(string &lowerPathHead, const string &lowerPathTail, return -EINVAL; } if (lowerPathHead.find(PID_FLAG) != string::npos) { + pid.erase(pid.size() - 1); lowerPathHead = lowerPathHead.replace(lowerPathHead.find(PID_FLAG), PID_FLAG.length(), pid); }