Boost logo

Boost Users :

From: Andrej van der Zee (mavdzee_at_[hidden])
Date: 2008-07-09 02:35:17


Hi,

I just found that Boost File System seems to be
completely broken on my system. The mini-program below
always behaves the same, it will print the string
enclosed in the first if-statement, regardless what
the values of p1 and p2 are.

I compiled boost on Cygwin with msvc-8.0. I also tried
the binary distribution for Windows XP, but I get the
same problems. What can this be?

Cheers,
Andrej

#include <iostream>
#include <boost/filesystem.hpp>

using namespace boost::filesystem;

int main(int argc, char* argv[])
{
  // No matter what values you put in here,
  // always same behavior.
  path p1("/nomatterwhat1");
  path p2("/nomatterwhat2");

  if (!exists(p1))
  {
    // This is always printed.
    std::cerr << "Directory does not exist: " << p1;
    return 1;
  }

  if (!exists(p2))
  {
    / This is never printed.
    std::cerr << "Directory does not exist: " << p2;
    return 1;
  }

  return 0;
}

      __________________________________________________________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net