forked from premiere/premiere-libtorrent
fix file attribute when creating torrents on windows
This commit is contained in:
parent
bf231bf86c
commit
46f585e928
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue