title: boost::filesystem::space() is reporting wrong diskspace
body: <p>I have 430 GB free on drive <code>C:</code>. But for this program:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;boost/filesystem.hpp&gt;
  
  int main()
  {
      boost::filesystem::path p("C:");
  
      std::size_t freeSpace = boost::filesystem::space(p).free;
      std::cout&lt;&lt;freeSpace &lt;&lt; " Bytes" &lt;&lt;std::endl;
      std::cout&lt;&lt;freeSpace / (1 &lt;&lt; 20) &lt;&lt; " MB"&lt;&lt;std::endl;
  
      std::size_t availableSpace = boost::filesystem::space(p).available;
      std::cout &lt;&lt; availableSpace &lt;&lt; " Bytes" &lt;&lt;std::endl;
      std::cout &lt;&lt; availableSpace / (1 &lt;&lt; 20) &lt;&lt; " MB"&lt;&lt;std::endl;
  
      std::size_t totalSpace = boost::filesystem::space(p).capacity;
      std::cout &lt;&lt; totalSpace &lt;&lt; " Bytes" &lt;&lt;std::endl;
      std::cout &lt;&lt; totalSpace / (1 &lt;&lt; 20) &lt;&lt; " MB"&lt;&lt;std::endl;
  
      return 0;
  }
  </code></pre>
  
  <p>The output is:</p>
  
  <pre><code>2542768128 Bytes
  2424 MB
  2542768128 Bytes
  2424 MB
  2830102528 Bytes
  2698 MB
  </code></pre>
  
  <p>I need to know how much diskspace is available because my application has to download a huge file, and I need to know whether it's viable to download it.</p>
  
  <p>I'm using mingw on Windows:</p>
  
  <pre><code>g++ (i686-posix-dwarf-rev2, Built by MinGW-W64 project) 7.1.0
  </code></pre>
  
  <p>I also tried using MXE to cross compile from Linux:</p>
  
  <pre><code>i686-w64-mingw32.static-g++ (GCC) 5.5.0
  </code></pre>
  
  <p>Both are returning the same numbers.</p>