- Timestamp:
- Apr 19, 2007 4:30:43 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/VirtualBoxImpl.cpp
r2148 r2239 3144 3144 } 3145 3145 3146 / / then iterate and find by name3146 /* then iterate and find by name */ 3147 3147 bool found = false; 3148 3148 if (aFilePathFull) … … 3157 3157 continue; 3158 3158 3159 found = 3160 #if defined (__LINUX__) 3161 hd->asVDI()->filePathFull() == aFilePathFull; 3162 #else 3163 !hd->asVDI()->filePathFull().compareIgnoreCase (aFilePathFull); 3164 #endif 3159 found = RTPathCompare (Utf8Str (aFilePathFull), 3160 Utf8Str (hd->asVDI()->filePathFull())) == 0; 3165 3161 if (found && aImage) 3166 3162 *aImage = hd->asVDI(); … … 3222 3218 found = (aId && (*it)->id() == *aId) || 3223 3219 (aFilePathFull && 3224 #if defined (__LINUX__) 3225 (*it)->filePathFull() == aFilePathFull); 3226 #else 3227 !(*it)->filePathFull().compareIgnoreCase (aFilePathFull)); 3228 #endif 3220 RTPathCompare (Utf8Str (aFilePathFull), 3221 Utf8Str ((*it)->filePathFull())) == 0); 3229 3222 if (found && aImage) 3230 3223 *aImage = *it; … … 3286 3279 found = (aId && (*it)->id() == *aId) || 3287 3280 (aFilePathFull && 3288 #if defined (__LINUX__) 3289 (*it)->filePathFull() == aFilePathFull); 3290 #else 3291 !(*it)->filePathFull().compareIgnoreCase (aFilePathFull)); 3292 #endif 3281 RTPathCompare (Utf8Str (aFilePathFull), 3282 Utf8Str ((*it)->filePathFull())) == 0); 3293 3283 if (found && aImage) 3294 3284 *aImage = *it; … … 3373 3363 if (!aHardDisk) 3374 3364 { 3375 rc = find VirtualDiskImage(aId, aFilePathFull, false /* aSetError */);3365 rc = findHardDisk (aId, aFilePathFull, false /* aSetError */); 3376 3366 found = SUCCEEDED (rc); 3377 3367 if (found) … … 3393 3383 if (found) 3394 3384 { 3395 if (aId )3385 if (aId && !aFilePathFull) 3396 3386 rc = setError (E_INVALIDARG, 3397 3387 tr ("A disk image with UUID {%Vuuid} is already registered"), 3398 3388 aId->raw()); 3399 else if (aFilePathFull )3389 else if (aFilePathFull && !aId) 3400 3390 rc = setError (E_INVALIDARG, 3401 3391 tr ("A disk image with file path '%ls' is already registered"),
Note:
See TracChangeset
for help on using the changeset viewer.