From 46f585e928fca9a01ed0bc334186c7c550f8ed01 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 14 Jul 2011 14:24:39 +0000 Subject: [PATCH] fix file attribute when creating torrents on windows --- src/create_torrent.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/create_torrent.cpp b/src/create_torrent.cpp index 40cfad344..7dcb14cc6 100644 --- a/src/create_torrent.cpp +++ b/src/create_torrent.cpp @@ -64,6 +64,7 @@ namespace libtorrent std::string path = convert_to_native(p); DWORD attr = GetFileAttributesA(path.c_str()); #endif // TORRENT_USE_WSTRING + if (attr == INVALID_FILE_ATTRIBUTES) return 0; if (attr & FILE_ATTRIBUTE_HIDDEN) return file_storage::attribute_hidden; return 0; #else