Boost logo

Boost Users :

From: LI Daobing (lidaobing_at_[hidden])
Date: 2005-12-16 00:44:09


Hello, I use Debian/Linux and libboost-filesystem-dev(1.33.0-5), and I
meet the following problem, I want to know whether it is bug or my
mistake, please help me, thanks.

See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=343491

$ cat copy_file.cpp
#include <boost/filesystem/operations.hpp>
using namespace boost::filesystem;
int main()
{
  copy_file("bad", "#");
  return 0;
}
$ g++ -o copy_file copy_file.cpp -lboost_filesystem
$ touch bad
$ ls -l bad
-rw-r--r-- 1 nichloas nichloas 0 2005-12-16 00:33 bad
$ ./copy_file
terminate called after throwing an instance of
'boost::filesystem::filesystem_error'
  what(): boost::filesystem::path: invalid name "#" in path: "#"
Aborted
$ g++ -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-awt=gtk-default
--enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre
--enable-mpfr --disable-werror --enable-checking=release
i486-linux-gnu
Thread model: posix
gcc version 4.0.3 20051201 (prerelease) (Debian 4.0.2-5)
$

--
LI Daobing

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