245 free(fpath); |
245 free(fpath); |
246 return ret; |
246 return ret; |
247 } |
247 } |
248 |
248 |
249 int sys_lstat(const char *path, SYS_STAT *s) { |
249 int sys_lstat(const char *path, SYS_STAT *s) { |
250 // TODO: fix |
250 return sys_stat(path, s); // unsupported on windows |
251 wchar_t *fpath = path2winpath(path, FALSE, NULL); |
|
252 if(!fpath) { |
|
253 fprintf(stderr, "Cannot convert path \"%s\" to UTF16\n", path); |
|
254 return -1; |
|
255 } |
|
256 int ret = _wstat64(fpath, s); |
|
257 free(fpath); |
|
258 return ret; |
|
259 } |
251 } |
260 |
252 |
261 int sys_rename(const char *oldpath, const char *newpath) { |
253 int sys_rename(const char *oldpath, const char *newpath) { |
262 wchar_t *o = path2winpath(oldpath, FALSE, NULL); |
254 wchar_t *o = path2winpath(oldpath, FALSE, NULL); |
263 wchar_t *n = path2winpath(newpath, FALSE, NULL); |
255 wchar_t *n = path2winpath(newpath, FALSE, NULL); |