| 422 | } |
| 423 | |
| 424 | FILE *cbm_fopen(const char *path, const char *mode) { |
| 425 | wchar_t *wpath = cbm_path_to_wide(path); |
| 426 | if (!wpath) { |
| 427 | return NULL; |
| 428 | } |
| 429 | wchar_t *wmode = cbm_utf8_to_wide(mode); |
| 430 | if (!wmode) { |
| 431 | free(wpath); |
| 432 | return NULL; |
| 433 | } |
| 434 | FILE *f = _wfopen(wpath, wmode); |
| 435 | free(wpath); |
| 436 | free(wmode); |
| 437 | return f; |
| 438 | } |
| 439 | |
| 440 | /* Stamp the exact current user as owner and apply an owner-only protected |
| 441 | * DACL on a directory cbm just created. Under the Administrators-default-owner |