소스 검색

fix(electron): open in directory on Win

charlie 4 년 전
부모
커밋
dc4e9436d5
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      resources/js/preload.js

+ 5 - 1
resources/js/preload.js

@@ -55,7 +55,11 @@ contextBridge.exposeInMainWorld('apis', {
   },
 
   showItemInFolder (fullpath) {
-    shell.showItemInFolder(fullpath)
+    if (IS_WIN32) {
+      shell.openPath(path.dirname(fullpath))
+    } else {
+      shell.showItemInFolder(fullpath)
+    }
   },
 
   /**