From: ShadowNinja Date: Tue, 23 Dec 2014 20:23:21 +0000 (-0500) Subject: Fix fs::GetRecursiveSubPaths trying to get directory lists for files X-Git-Tag: 0.4.11~2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=33eed6eb84078b51c7ba24a774d7f56ec2bc951d;p=oweals%2Fminetest.git Fix fs::GetRecursiveSubPaths trying to get directory lists for files --- 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 &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); + } } }