summaryrefslogtreecommitdiff
path: root/src/filesys.cpp
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2014-12-23 15:23:21 -0500
committerShadowNinja <shadowninja@minetest.net>2014-12-24 17:23:07 -0500
commit33eed6eb84078b51c7ba24a774d7f56ec2bc951d (patch)
tree8c4d0c6f48ae1444347d03a026234685a1d47d93 /src/filesys.cpp
parent8621e6de5dc031b547739ab3ff8dc1575a284d1b (diff)
downloadminetest-33eed6eb84078b51c7ba24a774d7f56ec2bc951d.tar.gz
minetest-33eed6eb84078b51c7ba24a774d7f56ec2bc951d.tar.bz2
minetest-33eed6eb84078b51c7ba24a774d7f56ec2bc951d.zip
Fix fs::GetRecursiveSubPaths trying to get directory lists for files
Diffstat (limited to 'src/filesys.cpp')
-rw-r--r--src/filesys.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/filesys.cpp b/src/filesys.cpp
index 597643887..784715617 100644
--- a/src/filesys.cpp
+++ b/src/filesys.cpp
@@ -377,7 +377,9 @@ void GetRecursiveSubPaths(std::string path, std::vector<std::string> &dst)
const DirListNode &n = content[i];
std::string fullpath = path + DIR_DELIM + n.name;
dst.push_back(fullpath);
- GetRecursiveSubPaths(fullpath, dst);
+ if (n.dir) {
+ GetRecursiveSubPaths(fullpath, dst);
+ }
}
}