Fix opening Finder in MacOS when Opening Containing Folder.
@@ -315,8 +315,12 @@ class _DataController(_BaseController, WithUndoRedoStacks, WithNamespace):
print("Could not launch explorer. Tried nautilus, "
"dolphin and konqueror.")
else:
+ try:
subprocess.Popen(["finder", "{}".format(
os.path.dirname(path))])
+ except OSError or FileNotFoundError:
+ subprocess.Popen(["open", "{}".format(
+ os.path.dirname(path))])
def remove_readonly(self, path=None):
path = path or self.filename
