Index: src/display/window_file_list.cc =================================================================== --- src/display/window_file_list.cc (revision 1093) +++ src/display/window_file_list.cc (working copy) @@ -47,6 +47,9 @@ #include "window_file_list.h" +#include +namespace std { typedef std::basic_string wstring; }; + namespace display { // Don't really like the direction of the element dependency, but Index: src/input/path_input.cc =================================================================== --- src/input/path_input.cc (revision 1093) +++ src/input/path_input.cc (working copy) @@ -42,10 +42,19 @@ #include #include -#include +#include +#include +#include #include "path_input.h" +struct _transform_filename { + void operator () (utils::directory_entry& entry) { + if (S_ISDIR(entry.d_type)) + entry.d_name += '/'; + } +}; + namespace input { PathInput::PathInput() : Index: src/rpc/scgi.cc =================================================================== --- src/rpc/scgi.cc (revision 1093) +++ src/rpc/scgi.cc (working copy) @@ -88,7 +88,7 @@ char buffer[sizeof(sockaddr_un) + filename.size()]; sockaddr_un* sa = reinterpret_cast(buffer); - sa->sun_family = AF_LOCAL; + sa->sun_family = AF_UNIX; std::memcpy(sa->sun_path, filename.c_str(), filename.size() + 1); if (!get_fd().open_local()) Index: src/signal_handler.h =================================================================== --- src/signal_handler.h (revision 1093) +++ src/signal_handler.h (working copy) @@ -37,7 +37,7 @@ #ifndef RTORRENT_SIGNAL_HANDLER_H #define RTORRENT_SIGNAL_HANDLER_H -#include +#include #include class SignalHandler { Index: src/utils/directory.cc =================================================================== --- src/utils/directory.cc (revision 1093) +++ src/utils/directory.cc (working copy) @@ -38,6 +38,9 @@ #include #include +#include +#include +#include #include #include #include @@ -63,6 +66,8 @@ if (m_path.empty()) throw torrent::input_error("Directory::update() tried to open an empty path."); + std::string path=rak::path_expand(m_path); + DIR* d = opendir(rak::path_expand(m_path).c_str()); if (d == NULL) @@ -74,11 +79,18 @@ if ((flags & update_hide_dot) && entry->d_name[0] == '.') continue; - iterator itr = base_type::insert(end(), value_type()); + std::string full_path=path+'/'; + full_path+=entry->d_name; + + struct stat sb; + if(stat(full_path.c_str(),&sb)) + continue; - itr->d_fileno = entry->d_fileno; - itr->d_reclen = entry->d_reclen; - itr->d_type = entry->d_type; + iterator itr = base_type::insert(end(),value_type()); + + itr->d_fileno = sb.st_ino; + itr->d_reclen = 0; // doesn't seem to get used anywhere. + itr->d_type = sb.st_mode; #ifdef DIRENT_NAMLEN_EXISTS_FOOBAR itr->d_name = std::string(entry->d_name, entry->d_name + entry->d_namlen);