Просмотр исходного кода

RemovableDriveOutputDevice: Use device.getId()
Should fix unmounting on OSX. Found this solution in Linux*.py.

Untested and fingers crossed...

Thomas-Karl Pietrowski 9 лет назад
Родитель
Сommit
5a5664e164
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      plugins/RemovableDriveOutputDevice/OSXRemovableDrivePlugin.py

+ 1 - 1
plugins/RemovableDriveOutputDevice/OSXRemovableDrivePlugin.py

@@ -43,7 +43,7 @@ class OSXRemovableDrivePlugin(RemovableDrivePlugin.RemovableDrivePlugin):
         return drives
 
     def performEjectDevice(self, device):
-        p = subprocess.Popen(["diskutil", "eject", path], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+        p = subprocess.Popen(["diskutil", "eject", device.getId()], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
         output = p.communicate()
         Logger.log("d", "umount returned: %s.", repr(output))