| File src/utils/utils_win.c changed (mode: 100644) (index 8bf96970e..a54d8d5f4) |
| ... |
... |
win_to_unix_time(FILETIME ft) |
| 1201 |
1201 |
DWORD |
DWORD |
| 1202 |
1202 |
win_get_file_attrs(const char path[]) |
win_get_file_attrs(const char path[]) |
| 1203 |
1203 |
{ |
{ |
| 1204 |
|
DWORD attr; |
|
| 1205 |
|
wchar_t *utf16_path; |
|
| 1206 |
|
|
|
| 1207 |
1204 |
if(is_path_absolute(path) && !is_unc_path(path)) |
if(is_path_absolute(path) && !is_unc_path(path)) |
| 1208 |
1205 |
{ |
{ |
| 1209 |
1206 |
if(isalpha(path[0]) && !drive_exists(path[0])) |
if(isalpha(path[0]) && !drive_exists(path[0])) |
| |
| ... |
... |
win_get_file_attrs(const char path[]) |
| 1212 |
1209 |
} |
} |
| 1213 |
1210 |
} |
} |
| 1214 |
1211 |
|
|
| 1215 |
|
utf16_path = utf8_to_utf16(path); |
|
| 1216 |
|
attr = GetFileAttributesW(utf16_path); |
|
|
1212 |
|
wchar_t *utf16_path = utf8_to_utf16(path); |
|
1213 |
|
if(utf16_path == NULL) |
|
1214 |
|
{ |
|
1215 |
|
return INVALID_FILE_ATTRIBUTES; |
|
1216 |
|
} |
|
1217 |
|
|
|
1218 |
|
DWORD attr = GetFileAttributesW(utf16_path); |
| 1217 |
1219 |
free(utf16_path); |
free(utf16_path); |
| 1218 |
1220 |
|
|
| 1219 |
1221 |
return attr; |
return attr; |