fix file attribute when creating torrents on windows

This commit is contained in:
Arvid Norberg 2011-07-14 14:24:39 +00:00
parent bf231bf86c
commit 46f585e928
1 changed files with 1 additions and 0 deletions

View File

@ -64,6 +64,7 @@ namespace libtorrent
std::string path = convert_to_native(p); std::string path = convert_to_native(p);
DWORD attr = GetFileAttributesA(path.c_str()); DWORD attr = GetFileAttributesA(path.c_str());
#endif // TORRENT_USE_WSTRING #endif // TORRENT_USE_WSTRING
if (attr == INVALID_FILE_ATTRIBUTES) return 0;
if (attr & FILE_ATTRIBUTE_HIDDEN) return file_storage::attribute_hidden; if (attr & FILE_ATTRIBUTE_HIDDEN) return file_storage::attribute_hidden;
return 0; return 0;
#else #else