mirror of
				https://github.com/arsenetar/dupeguru.git
				synced 2025-09-11 17:58:17 +00:00 
			
		
		
		
	Reveal in Explorer / Finder, close #895
This commit is contained in:
		
							parent
							
								
									2fff1a3436
								
							
						
					
					
						commit
						6b8f85e39a
					
				| @ -70,7 +70,8 @@ except ImportError: | |||||||
|         from PyQt5.QtGui import QDesktopServices |         from PyQt5.QtGui import QDesktopServices | ||||||
|         from qtlib.util import getAppData |         from qtlib.util import getAppData | ||||||
|         from core.util import executable_folder |         from core.util import executable_folder | ||||||
|         from hscommon.plat import ISWINDOWS |         from hscommon.plat import ISWINDOWS, ISOSX | ||||||
|  |         import subprocess | ||||||
| 
 | 
 | ||||||
|         def _open_url(url): |         def _open_url(url): | ||||||
|             QDesktopServices.openUrl(QUrl(url)) |             QDesktopServices.openUrl(QUrl(url)) | ||||||
| @ -80,7 +81,12 @@ except ImportError: | |||||||
|             QDesktopServices.openUrl(url) |             QDesktopServices.openUrl(url) | ||||||
| 
 | 
 | ||||||
|         def _reveal_path(path): |         def _reveal_path(path): | ||||||
|             _open_path(op.dirname(str(path))) |             if ISWINDOWS: | ||||||
|  |                 subprocess.run(["explorer", "/select,", op.abspath(path)]) | ||||||
|  |             elif ISOSX: | ||||||
|  |                 subprocess.run(["open", "-R", op.abspath(path)]) | ||||||
|  |             else: | ||||||
|  |                 _open_path(op.dirname(str(path))) | ||||||
| 
 | 
 | ||||||
|         def _special_folder_path(special_folder, appname=None, portable=False): |         def _special_folder_path(special_folder, appname=None, portable=False): | ||||||
|             if special_folder == SpecialFolder.Cache: |             if special_folder == SpecialFolder.Cache: | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user