Changeset - 70f8fba1f28a
[Not reviewed]
default
0 1 0
Mads Kiilerich - 9 years ago 2016-06-10 01:19:58
madski@unity3d.com
repos: fix unicode error when scanning and finding repositories with unicode names
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/utils.py
Show inline comments
 
@@ -212,13 +212,13 @@ def get_filesystem_repos(path, recursive
 

	
 
    :param path: path to scan for repositories
 
    :param recursive: recursive search and return names with subdirs in front
 
    """
 

	
 
    # remove ending slash for better results
 
    path = path.rstrip(os.sep)
 
    path = safe_str(path.rstrip(os.sep))
 
    log.debug('now scanning in %s location recursive:%s...', path, recursive)
 

	
 
    def _get_repos(p):
 
        if not os.access(p, os.R_OK) or not os.access(p, os.X_OK):
 
            log.warning('ignoring repo path without access: %s', p)
 
            return
 
@@ -230,13 +230,13 @@ def get_filesystem_repos(path, recursive
 
            cur_path = os.path.join(p, dirpath)
 

	
 
            # skip removed repos
 
            if skip_removed_repos and REMOVED_REPO_PAT.match(dirpath):
 
                continue
 

	
 
            #skip .<something> dirs
 
            #skip .<something> dirs TODO: rly? then we should prevent creating them ...
 
            if dirpath.startswith('.'):
 
                continue
 

	
 
            try:
 
                scm_info = get_scm(cur_path)
 
                yield scm_info[1].split(path, 1)[-1].lstrip(os.sep), scm_info
0 comments (0 inline, 0 general)