$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: outlaw (outlaw_at_[hidden])
Date: 2000-03-30 08:36:44
After using the dir_it library at http://www.boost.org/libs/dir_it/index.htm
I've modified get<user_execute> as follows. I use Msvc6 with Dinkumware's
C++
library, and name.substr was throwing an exception when the file had no "."
in the name (pos == npos) under NT5.
template <> get<user_execute>::operator user_execute::value_type() const
{
std::string name(*m_it);
std::string::size_type pos;
if( (pos = name.find_last_of('.') ) != std::string::npos)
{
std::string ext( name.substr( pos ) );
return ext == ".exe" || ext == ".bat";
}
return false;
}
Mario Contestabile
MarioC_at_[hidden]