Fix double-click file opening in installed Windows app (v1.7.5)

This fix addresses the critical issue where double-clicking .md files would not open them in the installed PanConverter application on Windows.
## Root Cause
When a user double-clicks a file and the app is already running, Windows tries to launch a SECOND INSTANCE with the file path. Without single-instance lock handling, that second instance would exit and the first instance would never receive the file path.
## Changes
- Added single-instance lock handling in main.js (lines 52-85)
- Implemented second-instance event handler to capture file paths
- Focus existing window when second instance is attempted
- Pass file path to existing instance using openFileFromPath()
- Properly handle rendererReady state for file opening
## Testing
- Works in development mode (npm start)
- Should now work correctly in installed Windows app with double-click
- Maintains single instance behavior across all file opening methods
🤖 Generated with [Claude Code](https://claude.com/claude-code)
This commit is contained in:
2025-10-11 13:46:48 +05:30
parent a02f96275e
commit 818a746a88
2 changed files with 36 additions and 1 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "pan-converter",
"version": "1.7.4",
"version": "1.7.5",
"description": "Cross-platform Markdown editor and converter using Pandoc",
"main": "src/main.js",
"scripts": {