wormi4ok / evernote2md

Convert Evernote .enex files to Markdown
MIT License
932 stars 79 forks source link

Error converting notes when resulting image filename is invalid for the OS #13

Closed cverbiest closed 3 years ago

cverbiest commented 4 years ago

Problem statement Conversion fails on images referenced in note

evernote2md.exe -v  ldif.enex evout
2020/09/17 10:59:42 [DEBUG] Saving file evout/Getting_an_LDIF_Export_of_a_User_or_Group-Crowd_2-8-Atlassian_Documentation.md
2020/09/17 10:59:42 [DEBUG] Saving attachment evout/image/grey_attach.png
2020/09/17 10:59:42 [DEBUG] Saving attachment evout/image/ldif.jpg?version=1&modificationdate=1224043351324&api=v2
2020/09/17 10:59:42 [ERROR] save resource evout/image/ldif.jpg?version=1&modificationdate=1224043351324&api=v2: open evout\image\ldif.jpg?version=1&modificationdate=1224043351324&api=v2: The filename, directory name, or volume label syntax is incorrect.

Example file ldif.zip

wormi4ok commented 4 years ago

Hi, @cverbiest. Thanks again for providing more information on the issue!

I don't have a Windows machine to reproduce the problem, but it seems that the special characters in the path to the image are valid for a URL, but illegal to use in the file path in Windows. I didn't create a new release, but you can try to use this draft version. If the problem is not solved (there could be other files that still fail with the same error) I'll try to implement the flow, that doesn't stop processing on error.