Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Error in File.stat #2424
I'm using jruby 1.7.17
I tested this code on windows 7.
And I got an error when I set java default encoding utf-8.
The file specified by the variable path exists.
referenced this issue
Jan 5, 2015
This is an additional information.
I think handling of the path encoding when accessing the file attributes may be a cause.
Ok, I think I see the problem. We are using _stat64 as our win32 stat call, but we probably should be using _wstat which supports wide characters. There may be a way to make stat64 work properly if we transcode the characters to some appropriate encoding (we we may not be doing by just letting default Java transcoding convert the char back to byte.
I'll see if I can get a jnr-posix change made to add _wstat.
Yup, that appears to fix it. We will need to patch and release jnr-posix for this. I will make the change there, but we need a release of it and pom.xml bump for 9k.pre2.
This may also fix it in 1.7, but I did not test that. 1.7 would need the same jnr-posix upgrade treatment.
Tagging @enebo re: jnr-posix lifecycle.