rednotebook icon indicating copy to clipboard operation
rednotebook copied to clipboard

Crash when adding files in Windows

Open ycwang-hello opened this issue 3 years ago • 1 comments

Describe the bug

In Windows the paths to files use \ instead of /. For example, if one inserts an image in RedNotebook, the code is [""file:///C:\path\to\file"".jpg]. Then if one tries to click "preview", the RedNotebook becomes not responding.

If I manually change [""file:///C:\path\to\file"".jpg] to [""file:///C:/path/to/file"".jpg], I can preview and see the image normally. So I think the solution is automatically changing \ to / when running on Windows.

To Reproduce

  1. Insert a file
  2. Click preview
  3. RedNotebook stops responding

Expected behavior

Should be able to preview it normally.

Screenshots

Versions:

  • RedNotebook version : 2.21
  • Operating system and version: Windows 10

Log output when reproducing bug

ycwang-hello avatar May 23 '21 07:05 ycwang-hello

Update: After manually changing [""file:///C:\path\to\file"".jpg] to [""file:///C:/path/to/file"".jpg], I inserted some new files and did not change \ to /, but "preview" still worked normally. So it seems that the bug only occurs when inserting a file for the first time. I'm not sure why.

ycwang-hello avatar May 23 '21 08:05 ycwang-hello

I'm closing this issue for now, since there hasn't been any recent activity. Feel free to reopen it if the issue persists in the latest RedNotebook version.

jendrikseipp avatar Nov 20 '22 09:11 jendrikseipp