~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/externalcommand.py

Fix ExternalCommand to not run random files in the current directory, unless it is truly in BZRPATH

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
        bzrpath = os.environ.get('BZRPATH', '')
35
35
 
36
36
        for dir in bzrpath.split(os.pathsep):
 
37
            ## Empty directories are not real paths
 
38
            if not dir:
 
39
                continue
37
40
            path = os.path.join(dir, cmd)
38
41
            if os.path.isfile(path):
39
42
                return ExternalCommand(path)