VirtualBox

Changeset 86436 in vbox


Ignore:
Timestamp:
Oct 4, 2020 11:36:35 AM (4 years ago)
Author:
vboxsync
Message:

common/webutils.py: Fixed local file handling in downloadFile. bugref:9841

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/common/webutils.py

    r82968 r86436  
    174174    else:
    175175        # Assumes file from the build share.
    176         sSrcPath = os.path.join(sLocalPrefix, sUrlFile);
     176        if sUrlFile.startswith('file:///'):
     177            sSrcPath = sUrlFile[7:];
     178        elif sUrlFile.startswith('file://'):
     179            sSrcPath = sUrlFile[6:];
     180        elif os.path.isabs(sUrlFile):
     181            sSrcPath = sUrlFile;
     182        else:
     183            sSrcPath = os.path.join(sLocalPrefix, sUrlFile);
    177184        fnLog('Copying "%s" to "%s"...' % (sSrcPath, sDstFile));
    178185        try:
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