From 45992dd10b70ddb67e040455401d3d8c6e80c59a Mon Sep 17 00:00:00 2001 From: daid303 Date: Thu, 8 Nov 2012 10:56:31 +0100 Subject: [PATCH] Fix safe remove of volume. --- Cura/gui/sliceProgessPanel.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Cura/gui/sliceProgessPanel.py b/Cura/gui/sliceProgessPanel.py index 6051b615..8801d17d 100644 --- a/Cura/gui/sliceProgessPanel.py +++ b/Cura/gui/sliceProgessPanel.py @@ -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: -- 2.30.2