VirtualBox

Changeset 20470 in vbox for trunk/src


Ignore:
Timestamp:
Jun 10, 2009 4:20:57 PM (16 years ago)
Author:
vboxsync
Message:

FE/Qt4: fixed the document path existing checking

File:
1 edited

Legend:

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

    r20386 r20470  
    41164116    /* Make sure the path exists */
    41174117    QDir dir (path);
    4118     /* We have to make sure this is an absolute path. If not 'dir.cdUp' below
    4119      * will block in some rare cases. */
    4120     dir.makeAbsolute();
    4121     while (!dir.exists())
    4122         dir.cdUp();
    4123 
    4124     return QDir::cleanPath (dir.canonicalPath());
     4118    if (dir.exists())
     4119        return QDir::cleanPath (dir.canonicalPath());
     4120    else
     4121    {
     4122        dir.setPath (QDir::homePath() + "/Documents");
     4123        if (dir.exists())
     4124            return QDir::cleanPath (dir.canonicalPath());
     4125        else
     4126            return QDir::homePath();
     4127    }
    41254128}
    41264129
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