From 99ea5fd3edb9afc443a547e0f0585493b776b6a9 Mon Sep 17 00:00:00 2001 From: Bryan Schumaker Date: Tue, 9 Nov 2010 20:06:46 -0500 Subject: [PATCH] libsaria.path FSTree() path should use an FSTree() instead of a Tree() --- libsaria/path.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/libsaria/path.py b/libsaria/path.py index d6cdf86c..2adb3d01 100644 --- a/libsaria/path.py +++ b/libsaria/path.py @@ -20,7 +20,7 @@ plugin_dir = None make_tree = None shutil = None -Tree = None +FSTree = None s_dir = None p_dir = None @@ -72,20 +72,17 @@ def mkdir(path): def make_tree_once(path): - global Tree - from trees import Tree + global FSTree + from trees import FSTree global make_tree make_tree = make_tree_rest return make_tree(path) def make_tree_rest(path): - global Tree - tree = Tree() - count = 0 + global FSTree + tree = FSTree() for root,dirs,files in walk(path): - split = root.split() + split = root.split(sep) for file in files: - tree.insert_path_split(root, file) - count += 1 - tree.value = count + tree.insert_path_split(split, file) return tree make_tree = make_tree_once