VirtualBox

Changeset 21998 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 5, 2009 2:09:09 PM (15 years ago)
Author:
vboxsync
Message:

Python shell: correct detection of home dir in remote case

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxShell/vboxshell.py

    r21965 r21998  
    509509        print "    Image at: %s" %(vdvd.location)
    510510        print "    Size: %s" %(vdvd.size)
     511        print "    Id: %s" %(vdvd.id)
    511512        print
    512513
     
    806807def reloadExtCmd(ctx, args):
    807808   # maybe will want more args smartness
    808    checkUserExtensions(ctx, commands, ctx['vb'].homeFolder)
     809   checkUserExtensions(ctx, commands, getHomeFolder(ctx))
    809810   autoCompletion(commands, ctx)
    810811   return 0
     
    10321033        addExtsFromFile(ctx, cmds, os.path.join(shextdir,e))
    10331034
     1035def getHomeFolder(ctx):
     1036    if ctx['remote'] or ctx['vb'] is None:
     1037        return os.path.join(os.path.expanduser("~"), ".VirtualBox")
     1038    else:
     1039        return ctx['vb'].homeFolder
     1040
    10341041def interpret(ctx):
    10351042    if ctx['remote']:
     
    10411048    if vbox is not None:
    10421049        print "Running VirtualBox version %s" %(vbox.version)
    1043         ctx['perf'] = ctx['global'].getPerfCollector(ctx['vb'])
    1044         home = vbox.homeFolder
     1050        ctx['perf'] = ctx['global'].getPerfCollector(vbox)
    10451051    else:
    10461052        ctx['perf'] = None
    1047         home = os.path.join(os.path.expanduser("~"), ".VirtualBox")
    1048 
     1053
     1054    home = getHomeFolder(ctx)
    10491055    checkUserExtensions(ctx, commands, home)
    10501056
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette