| 2897 | } |
| 2898 | |
| 2899 | int link(const char *oldpath, const char *newpath) |
| 2900 | { |
| 2901 | wchar_t woldpath[MAX_PATH], wnewpath[MAX_PATH]; |
| 2902 | if (xutftowcs_path(woldpath, oldpath) < 0 || |
| 2903 | xutftowcs_path(wnewpath, newpath) < 0) |
| 2904 | return -1; |
| 2905 | |
| 2906 | if (!CreateHardLinkW(wnewpath, woldpath, NULL)) { |
| 2907 | errno = err_win_to_posix(GetLastError()); |
| 2908 | return -1; |
| 2909 | } |
| 2910 | return 0; |
| 2911 | } |
| 2912 | |
| 2913 | int symlink(const char *target, const char *link) |
| 2914 | { |
no test coverage detected