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