Fix fs::GetRecursiveSubPaths trying to get directory lists for files
authorShadowNinja <shadowninja@minetest.net>
Tue, 23 Dec 2014 20:23:21 +0000 (15:23 -0500)
committerShadowNinja <shadowninja@minetest.net>
Wed, 24 Dec 2014 22:23:07 +0000 (17:23 -0500)
src/filesys.cpp

index 597643887c43a8365144461340a16357820c8a06..784715617d5de18b1e9dd52be12e3f1a1a05dfae 100644 (file)
@@ -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);
+               }
        }
 }