--- vtdata/directory.cpp.orig Wed Nov 11 04:06:16 1998 +++ vtdata/directory.cpp Fri Apr 27 20:22:21 2001 @@ -17,7 +17,7 @@ // -------------------------------------------------------------------------- -#include "boost/directory.h" +#include "directory.h" #if defined(unix) || defined(__unix) || defined(__unix__) # define BOOST_UNIX 1 @@ -58,7 +58,7 @@ operator++ (); } - ~representation() { closedir(m_handle); } + ~representation() { if (m_handle) closedir(m_handle); } representation *reference() { @@ -175,6 +175,8 @@ throw unknown_uid(it.rep->get_stat().st_uid); return pw->pw_name; } +#ifdef BUGGY_CODE + // See directory.h for details template <> void set(dir_it const &it, std::string name) { struct passwd *pw = getpwnam(name.c_str()); @@ -183,6 +185,7 @@ else throw unknown_uname(name); } +#endif template <> gid_t get(dir_it const &it) { return it.rep->get_stat().st_gid; } template <> void set(dir_it const &it, gid_t gid) { it.rep->change_group(gid); } @@ -193,6 +196,8 @@ throw unknown_gid(it.rep->get_stat().st_gid); return grp->gr_name; } +#ifdef BUGGY_CODE + // See directory.h for details template <> void set(dir_it const &it, std::string name) { struct group *grp = getgrnam(name.c_str()); @@ -201,7 +206,7 @@ else throw unknown_gname(name); } - +#endif template <> bool get(dir_it const &it) { return (*it)[0] == '.'; } }