Fix safe remove of volume.

master
daid303 2012-11-08 10:56:31 +01:00
parent a4adcc90b7
commit 45992dd10b
1 changed files with 3 additions and 1 deletions

View File

@ -95,8 +95,10 @@ class sliceProgessPanel(wx.Panel):
def OnSafeRemove(self):
if platform.system() == "Windows":
cmd = "%s %s>NUL" % (os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'EjectMedia.exe')), profile.getPreference('sdpath'))
elif platform.system() == "Darwin":
cmd = "diskutil eject '%s' > /dev/null 2>&1" % (profile.getPreference('sdpath'))
else:
cmd = "umount %s > /dev/null 2>&1" % (profile.getPreference('sdpath'))
cmd = "umount '%s' > /dev/null 2>&1" % (profile.getPreference('sdpath'))
if os.system(cmd):
self.GetParent().preview3d.ShowWarningPopup("Safe remove failed.")
else: