[Notes] [Git][BuildStream/buildstream][mablanch/448-autocompletion-broken-defaults] complete.py: Ensure paths get completed from 'element-path'



Title: GitLab

Martin Blanchard pushed to branch mablanch/448-autocompletion-broken-defaults at BuildStream / buildstream

Commits:

1 changed file:

Changes:

  • buildstream/_frontend/complete.py
    ... ... @@ -68,9 +68,10 @@ def complete_path(path_type, incomplete, base_directory='.'):
    68 68
             # If there was nothing on the left of the last separator,
    
    69 69
             # we are completing files in the filesystem root
    
    70 70
             base_path = os.path.join(base_directory, base_path)
    
    71
    -
    
    72
    -    elif os.path.isdir(incomplete):
    
    73
    -        base_path = incomplete
    
    71
    +    else:
    
    72
    +        incomplete_base_path = os.path.join(base_directory, incomplete)
    
    73
    +        if os.path.isdir(incomplete_base_path):
    
    74
    +            base_path = incomplete_base_path
    
    74 75
     
    
    75 76
         try:
    
    76 77
             if base_path:
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]