From: daid303 Date: Thu, 8 Nov 2012 09:56:31 +0000 (+0100) Subject: Fix safe remove of volume. X-Git-Tag: 13.03~199 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=45992dd10b70ddb67e040455401d3d8c6e80c59a;p=cura.git Fix safe remove of volume. --- 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: