diff options
author | dynaflash <[email protected]> | 2008-10-03 19:10:26 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2008-10-03 19:10:26 +0000 |
commit | 5c3240cca3b0469280484f18c2d07b5f9af42f81 (patch) | |
tree | f53b7b23bde68d7a1ef05db179b1ba95dc2c045a /macosx/HBDVDDetector.m | |
parent | d788a4e391e103413ac92e7513bf6d0e13e11a65 (diff) |
MacGui: Allow the macgui to properly read sources from a ZFS (zfs-119) formatted drive (experimental in Leopard). Thanks KonaB1end for the patch.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1803 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBDVDDetector.m')
-rw-r--r-- | macosx/HBDVDDetector.m | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/macosx/HBDVDDetector.m b/macosx/HBDVDDetector.m index fb9541dab..588d32d81 100644 --- a/macosx/HBDVDDetector.m +++ b/macosx/HBDVDDetector.m @@ -112,7 +112,18 @@ // A version 4 GetVolParmsInfoBuffer contains the BSD node name in the vMDeviceID field. // It is actually a char * value. This is mentioned in the header CoreServices/CarbonCore/Files.h. - return [NSString stringWithCString:(char *)volumeParms.vMDeviceID]; + if( volumeParms.vMVersion < 4 ) + { + return nil; + } + + // vMDeviceID might be zero as is reported with experimental ZFS (zfs-119) support in Leopard. + if( !volumeParms.vMDeviceID ) + { + return nil; + } + + return [NSString stringWithCString:(const char *)volumeParms.vMDeviceID]; } |