Message9349

Author zyasoft
Recipients amak, dchrome, fwierzbicki, jeff.allen, zyasoft
Date 2015-01-07.17:10:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1420650638.93.0.0243554297416.issue2014@psf.upfronthosting.co.za>
In-reply-to
Content
I reviewed http://jira.codehaus.org/browse/JRUBY-6136, and it's clear we need to do something similar to https://github.com/jruby/jruby/commit/947c661e46683ea82f8016dde9d3fa597cd10e56

which I copied here since it's so short

+    public RaiseException newErrnoFromInt(int errno, String methodName, String message) {
+        if (Platform.IS_WINDOWS && ("stat".equals(methodName) || "lstat".equals(methodName))) {
+            if (errno == 20047) return newErrnoENOENTError(message); // boo:bar UNC stat failure
+            if (errno == Errno.ESRCH.intValue()) return newErrnoENOENTError(message); // ESRCH on stating ""
+        }
+        
+        return newErrnoFromInt(errno, message);
+    }

basically we just to hardcode the workaround to treat 20047 and errno.ESRCH as special on Windows for stat, lstat so they work like on CPython (and presumably on C version of Ruby) and map to what we expect.

Interestingly, JRuby chooses to map to errno.ENOENT instead of errno.EEXIST...

Need to fix for 2.7.0
History
Date User Action Args
2015-01-07 17:10:38zyasoftsetmessageid: <1420650638.93.0.0243554297416.issue2014@psf.upfronthosting.co.za>
2015-01-07 17:10:38zyasoftsetrecipients: + zyasoft, fwierzbicki, amak, jeff.allen, dchrome
2015-01-07 17:10:38zyasoftlinkissue2014 messages
2015-01-07 17:10:38zyasoftcreate