Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colon in filename gives an error when creating a PNG from a Lilypond diagram on a Windows folder #424

Closed
georgeraraujo opened this issue Jul 30, 2023 · 1 comment

Comments

@georgeraraujo
Copy link

Hi,
I run asciidoctor in a Linux guest VM in VirtualBox on a Windows host. I mount a Windows folder on a mount point in the Linux VM.

I noticed that the last release supports Lilypond diagrams (THANKS!) and decided to try it. When I processed the sample document, I got an error; when I tried it again in a folder inside the VM's virtual hard disk, it worked fine:

vboxuser@asciidoctor:/mnt/windows_shared_folder$ asciidoctor -r asciidoctor-diagram lilypond.adoc
asciidoctor: ERROR: lilypond.adoc: line 6: Failed to generate image: Protocol error @ rb_sysopen - /mnt/windows_shared_folder/diag-:md5:b7d074b335dbb39dbd4e4501c5a27831.png
vboxuser@asciidoctor:/mnt/windows_shared_folder$ cd ~/linux_folder/
vboxuser@asciidoctor:~/linux_folder$ asciidoctor -r asciidoctor-diagram lilypond.adoc
vboxuser@asciidoctor:~/linux_folder$ ls
diag-:md5:b7d074b335dbb39dbd4e4501c5a27831.png  lilypond.adoc  lilypond.html
vboxuser@asciidoctor:~/linux_folder$

I think that's because the filename for the generated PNG has a colon (:). Would you consider changing the colon for some other character, or dropping it altogether?

Thanks!

@pepijnve
Copy link
Member

pepijnve commented Jul 30, 2023

Since the file is being written to the Windows host filesystem the filename needs to be valid for NTFS. That would explain the error. I'll change the separator character to something that's valid on Windows filesystems as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants