Skip to content

Commit

Permalink
Merge commit 'b7a7fe1'
Browse files Browse the repository at this point in the history
  • Loading branch information
rdp committed Jun 18, 2013
2 parents 60b0774 + b7a7fe1 commit d3ad1d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/simple_gui_creator/drive_info.rb
Expand Up @@ -128,6 +128,7 @@ def self.get_all_drives_as_ostructs_internal
require 'plist'
Dir['/Volumes/*'].map{|dir|
parsed = Plist.parse_xml(`diskutil info -plist "#{dir}"`)
next unless parsed # some odd mount points like /Volumes/SugarSync have no output...
d2 = OpenStruct.new
d2.VolumeName = parsed["VolumeName"]
d2.Name = dir # DevNode?
Expand All @@ -140,7 +141,7 @@ def self.get_all_drives_as_ostructs_internal
end
d2.DevicePoint = parsed['DeviceNode'].sub('disk', 'rdisk') # I've heard using rdisk is better/faster...
d2
}
}.compact
else
require 'ruby-wmi'
disks = WMI::Win32_LogicalDisk.find(:all)
Expand Down

0 comments on commit d3ad1d1

Please sign in to comment.