-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help needed: Looking for an "official" workaround for Path Too Long #57
Comments
+1 |
Duplicate of #53? |
Yes, duplicate. Well, mostly - NTFS' limitations of a 260-character-long-path-component won't change anytime soon (probably, ever). And the Windows team can't just redefine _Null_terminated_ wchar_t path_str[ MAX_PATH ] = { 0 }; ...would be at risk of a stack overflow (66,000 bytes is way beyond the default stack commit size of 4K). A better C++ workaround is to (when MAX_PATH isn't enough) do something like: if ( MAX_PATH_not_enough ) {
const rsize_t path_buffer_number_characters = 33000u;
std::unique_ptr<_Null_terminated_ wchar_t[]> path_buffer = std::make_unique< wchar_t []>( path_buffer_number_characters);
const rsize_t size_in_bytes = ( path_buffer_number_characters * sizeof( path_buffer[ 0 ] );
memset( path_buffer.get( ), 0, size_in_bytes );
//Use the buffer
//Prepend "\\?\" if not done already.
} Sure, you're using heap - but only in the (hopefully) rare situation when you're dealing with long paths. |
Closing as duplicate of #53. This is something we would like to have, but not at this time. |
Related:
This is a universally known truth that the Windows limitation of Path Too Long is affecting almost every runtime and programming paradigm. Unfortunately, MSBuild is not different in that regard. Hopefully, someday we will see it get actually fixed by Windows team.. :)
Over at Web Essentials 2013, we are having issues packaging node.js modules into a
.visx
image, due to too nested dependencies. We are able to mitigate it using Pri.LongPath assembly via reflection(madskristensen/WebEssentials2013#1387 & madskristensen/WebEssentials2013#1803), which worked for a while in PreBuildTask, but now it is causing PathTooLong issue with<Copy> task
on packaging the assets to visx (WebEssentials2013.csproj#L1038). Is there a way we can override the default copying behavior and use hacks like "Pri.LongPath via reflection" there as well?This is main blocker for WE2013's vNext, which is overdue for quite some now. Any help would be much appreciated by all consumers of Web Essentials! 🎉
//cc @madskristensen, @SLaks.
The text was updated successfully, but these errors were encountered: