VirtualBox

Changeset 76833 in vbox


Ignore:
Timestamp:
Jan 16, 2019 10:51:50 AM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9361: A couple of fixes for args processing: First of all, handle relative path properly if file really exists in current folder; Besides that filter out handled URL properly as well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp

    r76829 r76833  
    465465        if (   !strArg.isEmpty()
    466466            && QFile::exists(strArg))
    467             listArgUrls << QUrl::fromLocalFile(strArg);
     467            listArgUrls << QUrl::fromLocalFile(QFileInfo(strArg).absoluteFilePath());
    468468    }
    469469
     
    475475        {
    476476            /* Check which of them has allowed VM extensions: */
    477             const QString &strFile = listArgUrls.at(i).toLocalFile();
     477            const QUrl url = listArgUrls.at(i);
     478            const QString strFile = url.toLocalFile();
    478479            if (VBoxGlobal::hasAllowedExtension(strFile, VBoxFileExts))
    479480            {
     
    486487                    launchMachine(comMachine);
    487488                    /* And remove their URLs from the ULR list: */
    488                     listArgUrls.removeAll(strFile);
     489                    listArgUrls.removeAll(url);
    489490                }
    490491            }
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