Open folder containing uploads with the file selected, in macOS and Windows

This commit is contained in:
Miguel Jacq 2018-09-19 11:24:19 +10:00
parent 6ac1ca3784
commit 41b4cea673
No known key found for this signature in database
GPG Key ID: EEA4341C6D97A0B6

View File

@ -92,15 +92,11 @@ class File(QtWidgets.QWidget):
# macOS
elif self.common.platform == 'Darwin':
# TODO: Implement opening folder with file selected in macOS
# This seems helpful: https://stackoverflow.com/questions/3520493/python-show-in-finder
self.common.log('File', 'open_folder', 'not implemented for Darwin yet')
subprocess.call(['open', '-R', abs_filename])
# Windows
elif self.common.platform == 'Windows':
# TODO: Implement opening folder with file selected in Windows
# This seems helpful: https://stackoverflow.com/questions/6631299/python-opening-a-folder-in-explorer-nautilus-mac-thingie
self.common.log('File', 'open_folder', 'not implemented for Windows yet')
webbrowser.Popen(['explorer', '/select', abs_filename])
class Upload(QtWidgets.QWidget):