Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2012-01-09 20:35:19 +0000
committerStijn Buys <ingar@osirion.org>2012-01-09 20:35:19 +0000
commit375bc5e54c6a9712f7f86b613cde49f5f5d41045 (patch)
treee1cbb3bfbca9d5a534b0e0b904ce6fcd6790ca48 /src/filesystem
parent8c6ffe0d6cced65f2118994854fd5be1bd4fddac (diff)
Store filenames only when reading directory content.
Diffstat (limited to 'src/filesystem')
-rw-r--r--src/filesystem/directory.cc3
1 files changed, 2 insertions, 1 deletions
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);
}
}