VirtualBox

Changeset 2271 in vbox for trunk


Ignore:
Timestamp:
Apr 20, 2007 1:01:05 PM (18 years ago)
Author:
vboxsync
Message:

bugfix: RTPathReal presumes that the path exists!

Location:
trunk/src/VBox/Frontends
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxBFE/VBoxBFE.cpp

    r1571 r2271  
    470470
    471471            /* resolve it. */
    472             hdaFile = RTPathRealDup(argv[curArg]);
     472            if (RTPathExists(argv[curArg]))
     473                hdaFile = RTPathRealDup(argv[curArg]);
    473474            if (!hdaFile)
    474475                return SyntaxError("The path to the specified harddisk, '%s', could not be resolved.\n", argv[curArg]);
     
    480481
    481482            /* resolve it. */
    482             fdaFile = RTPathRealDup(argv[curArg]);
     483            if (RTPathExists(argv[curArg]))
     484                fdaFile = RTPathRealDup(argv[curArg]);
    483485            if (!fdaFile)
    484486                return SyntaxError("The path to the specified floppy disk, '%s', could not be resolved.\n", argv[curArg]);
     
    490492
    491493            /* resolve it. */
    492             cdromFile = RTPathRealDup(argv[curArg]);
     494            if (RTPathExists(argv[curArg]))
     495                cdromFile = RTPathRealDup(argv[curArg]);
    493496            if (!cdromFile)
    494497                return SyntaxError("The path to the specified cdrom, '%s', could not be resolved.\n", argv[curArg]);
  • trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp

    r2238 r2271  
    996996            }
    997997            /* resolve it. */
    998             hdaFile = RTPathRealDup(argv[curArg]);
     998            if (RTPathExists(argv[curArg]))
     999                hdaFile = RTPathRealDup(argv[curArg]);
    9991000            if (!hdaFile)
    10001001            {
     
    10131014            }
    10141015            /* resolve it. */
    1015             fdaFile = RTPathRealDup(argv[curArg]);
     1016            if (RTPathExists(argv[curArg]))
     1017                fdaFile = RTPathRealDup(argv[curArg]);
    10161018            if (!fdaFile)
    10171019            {
     
    10301032            }
    10311033            /* resolve it. */
    1032             cdromFile = RTPathRealDup(argv[curArg]);
     1034            if (RTPathExists(argv[curArg]))
     1035                cdromFile = RTPathRealDup(argv[curArg]);
    10331036            if (!cdromFile)
    10341037            {
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