# Author: Lorenzo Berni <duplo@develer.com>
#
-import os
+import os, sys
import const
if not path.endswith(os.sep):
path += os.sep
file_dict = {}
- for root, dirs, files in os.walk(path, followlinks=True):
+ # also follow all symlinks under POSIX OSes
+ if os.name == 'posix' and sys.version_info >= (2, 6):
+ file_list = os.walk(path, followlinks=True)
+ else:
+ file_list = os.walk(path)
+ for root, dirs, files in file_list:
if root.find("svn") == -1:
file_dict[root.replace(path, "")] = {"dirs": [], "files": []}
for dir in dirs: