From 13d4ba77102346be45a0ee0a4a0b4eea9d12ca83 Mon Sep 17 00:00:00 2001 From: Bryan Schumaker Date: Tue, 9 Nov 2010 13:53:57 -0500 Subject: [PATCH] libsaria.path() with an FSTree() I now have a function to walk all files in a filesystem and make an FSTree(). --- libsaria/path.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libsaria/path.py b/libsaria/path.py index e6288a64..d6cdf86c 100644 --- a/libsaria/path.py +++ b/libsaria/path.py @@ -82,10 +82,9 @@ def make_tree_rest(path): tree = Tree() count = 0 for root,dirs,files in walk(path): - stripped_root = root.strip(sep) - split_root = root.split(sep) + split = root.split() for file in files: - tree.insert(split_root + [file]) + tree.insert_path_split(root, file) count += 1 tree.value = count return tree