| 445 | } |
| 446 | |
| 447 | FILE *cbm_fopen(const char *path, const char *mode) { |
| 448 | wchar_t *wpath = cbm_path_to_wide(path); |
| 449 | if (!wpath) { |
| 450 | return NULL; |
| 451 | } |
| 452 | wchar_t *wmode = cbm_utf8_to_wide(mode); |
| 453 | if (!wmode) { |
| 454 | free(wpath); |
| 455 | return NULL; |
| 456 | } |
| 457 | FILE *f = _wfopen(wpath, wmode); |
| 458 | free(wpath); |
| 459 | free(wmode); |
| 460 | return f; |
| 461 | } |
| 462 | |
| 463 | /* Stamp the exact current user as owner and apply an owner-only protected |
| 464 | * DACL on a directory cbm just created. Under the Administrators-default-owner |