We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
read
1 parent bd8b6f0 commit ee9b2a5Copy full SHA for ee9b2a5
src/core/p-dir.c
@@ -205,7 +205,7 @@
205
///OS_FREE(dir.file.path);
206
207
// don't throw an error if the original path contains wildcard chars * or ?
208
- if (result < 0 && !(dir.error == (REBCNT)-RFE_OPEN_FAIL && WILD_PATH(path)) ) {
+ if (result < 0 && !(result == (REBCNT)-RFE_OPEN_FAIL && WILD_PATH(path)) ) {
209
Trap_Port(RE_CANNOT_OPEN, port, dir.error);
210
}
211
src/os/host-device.c
@@ -349,7 +349,9 @@ static int Poll_Default(REBDEV *dev)
349
else if (result < 0) {
350
result = req->error;
351
// make sure that we are consistent and error is always negative...
352
- if (result > 0) result = -result;
+ if (result > 0) {
353
+ req->error = result = -result;
354
+ }
355
356
357
return result;
0 commit comments