typora / typora-issues

Bugs, suggestions or free discussions about the minimal markdown editor — Typora
https://typora.io
1.53k stars 58 forks source link

Scary ENOENT dialog when creating new file from command line #4565

Closed timrprobocom closed 3 years ago

timrprobocom commented 3 years ago

Describe the bug When opening a new document from the command line, we get an error dialog saying:

X  Failed to load file
   ENOENT: no such file or directory, open "C:\xxx\xxx\unknown.md"

On Windows, this is accompanied by the Windows warning tone. Linux gets the same warning, but no tone.

To Reproduce Steps to reproduce the behavior:

  1. From a command line, type "typora unknown.md" (assuming you do not have a file called "unknown.md"...)
  2. Observe frightening red X error dialog

Expected behavior Creating a new document is a completely normal activity. The user experience should be exactly as if the user had done File -> New.

Desktop (please complete the following information):

Typora Version 0.11.1

abnerlee commented 3 years ago

duplicated with #721

Currently new file from cmd has not been supported yet