[Lldb-commits] [lldb] [lldb][Windows] Support paths longer than MAX_PATH in FileSystem (PR #229727)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 7 10:49:38 PDT 2026
================
@@ -30,50 +31,57 @@ const char *FileSystem::PATH_CONVERSION_ERROR =
Status FileSystem::Symlink(const FileSpec &src, const FileSpec &dst) {
Status error;
- std::wstring wsrc, wdst;
- if (!llvm::ConvertUTF8toWide(src.GetPath(), wsrc) ||
+ llvm::SmallVector<wchar_t, MAX_PATH> wsrc, wdst_long;
+ std::wstring wdst;
+ if (llvm::sys::windows::widenPath(src.GetPath(), wsrc) ||
+ llvm::sys::windows::widenPath(dst.GetPath(), wdst_long) ||
!llvm::ConvertUTF8toWide(dst.GetPath(), wdst))
----------------
Nerixyz wrote:
Is `wdst` intentionally ignored?
[`CreateSymbolicLinkW`](https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-createsymboliclinkw) says
> By default, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, prepend "\\?\" to the path.
https://github.com/llvm/llvm-project/pull/229727
More information about the lldb-commits
mailing list