diff --git a/appveyor.yml b/appveyor.yml index bbb68ab5e..b38d7fe20 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,7 +4,7 @@ branches: - master - RC_1_2 - RC_1_1 -os: Visual Studio 2015 +image: Visual Studio 2015 clone_depth: 1 environment: matrix: diff --git a/include/libtorrent/create_torrent.hpp b/include/libtorrent/create_torrent.hpp index 6ace097bb..83ca9ed08 100644 --- a/include/libtorrent/create_torrent.hpp +++ b/include/libtorrent/create_torrent.hpp @@ -465,8 +465,11 @@ namespace detail { } #endif // TORRENT_ABI_VERSION +namespace aux { TORRENT_EXTRA_EXPORT file_flags_t get_file_attributes(std::string const& p); TORRENT_EXTRA_EXPORT std::string get_symlink_path(std::string const& p); } +} + #endif diff --git a/src/create_torrent.cpp b/src/create_torrent.cpp index c11250716..5321a6e91 100644 --- a/src/create_torrent.cpp +++ b/src/create_torrent.cpp @@ -170,6 +170,8 @@ namespace { } // anonymous namespace +namespace aux { + file_flags_t get_file_attributes(std::string const& p) { auto const path = convert_to_native_path_string(p); @@ -181,7 +183,7 @@ namespace { if (attr.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) return file_storage::flag_hidden; return {}; #else - struct ::stat s; + struct ::stat s{}; if (::lstat(path.c_str(), &s) < 0) return {}; file_flags_t file_attr = {}; if (s.st_mode & S_IXUSR) @@ -202,6 +204,7 @@ namespace { #endif } +} // anonymous aux #if TORRENT_ABI_VERSION == 1 diff --git a/src/path.cpp b/src/path.cpp index 4f083b554..6f1f45e85 100644 --- a/src/path.cpp +++ b/src/path.cpp @@ -223,7 +223,7 @@ namespace { // posix version - struct stat ret{}; + struct ::stat ret{}; int retval; if (flags & dont_follow_links) retval = ::lstat(f.c_str(), &ret);