Join GitHub today
Exception accessing file with long path on windows #3995
Fails also with:
The length of a file name respectively its path shall shall support more than 260 characters.
See https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath for more information.
When a script tries to access a file with a long path this exception is thrown:
Thank you for the repro. A couple notes.
@enebo You worked on Windows stat stuff a few times...any ideas?
Yes, JRuby and MRI crashed at the same directory depth. As mentioned above, I believe it is related to a legacy MAX_PATH definition of 260 characters in windows. Longer path names needs to be handled differently.
This is full backtrace:
@lbenner Ahh, thanks for the extra info and the MRI bug link.
We generally don't change functionality unilaterally, and I'm not sure how to fix this given that we're currently just using JDK features to navigate and manipulate paths. I'm inclined to see what ruby-core has to say about this one. If they come up with a solution (or you help us all come up with a solution) we'll see about getting it into JRuby.