chiark / gitweb /
Fix safe remove of volume.
authordaid303 <daid303@gmail.com>
Thu, 8 Nov 2012 09:56:31 +0000 (10:56 +0100)
committerdaid303 <daid303@gmail.com>
Thu, 8 Nov 2012 09:56:31 +0000 (10:56 +0100)
Cura/gui/sliceProgessPanel.py

index 6051b6150cd02e134ece88135dbc0f4773f75142..8801d17ddf3cbc00696781671d8e8dc5cd6999fd 100644 (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: