Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenlib/intern/storage.c
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| #ifndef __APPLE__ | #ifndef __APPLE__ | ||||
| eFileAttributes BLI_file_attributes(const char *path) | eFileAttributes BLI_file_attributes(const char *path) | ||||
| { | { | ||||
| int ret = 0; | int ret = 0; | ||||
| # ifdef WIN32 | # ifdef WIN32 | ||||
| wchar_t wline[FILE_MAXDIR]; | WCHAR wline[FILE_MAXDIR]; | ||||
| BLI_strncpy_wchar_from_utf8(wline, path, ARRAY_SIZE(wline)); | size_t bsize = count_utf_16_from_8(path); | ||||
| conv_utf_8_to_16(path, wline, bsize); | |||||
| DWORD attr = GetFileAttributesW(wline); | DWORD attr = GetFileAttributesW(wline); | ||||
| if (attr & FILE_ATTRIBUTE_READONLY) { | if (attr & FILE_ATTRIBUTE_READONLY) { | ||||
| ret |= FILE_ATTR_READONLY; | ret |= FILE_ATTR_READONLY; | ||||
| } | } | ||||
| if (attr & FILE_ATTRIBUTE_HIDDEN) { | if (attr & FILE_ATTRIBUTE_HIDDEN) { | ||||
| ret |= FILE_ATTR_HIDDEN; | ret |= FILE_ATTR_HIDDEN; | ||||
| } | } | ||||
| if (attr & FILE_ATTRIBUTE_SYSTEM) { | if (attr & FILE_ATTRIBUTE_SYSTEM) { | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||