From 375bc5e54c6a9712f7f86b613cde49f5f5d41045 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 9 Jan 2012 20:35:19 +0000 Subject: Store filenames only when reading directory content. --- src/filesystem/directory.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/filesystem') diff --git a/src/filesystem/directory.cc b/src/filesystem/directory.cc index 7339f17..af1c58b 100644 --- a/src/filesystem/directory.cc +++ b/src/filesystem/directory.cc @@ -56,7 +56,7 @@ void Directory::read() if (directory_handle) { while ((directory_entry = readdir(directory_handle))) { - std::string file_path(directory_location); + std::string file_path(directory_location.c_str()); file_path += '/'; file_path.append(directory_entry->d_name); @@ -71,6 +71,7 @@ void Directory::read() continue; } + file_path.assign(directory_entry->d_name); directory_filenames.push_back(file_path); } } -- cgit v1.2.3