grunt-photobox icon indicating copy to clipboard operation
grunt-photobox copied to clipboard

Colon in filenames

Open AdamBoman opened this issue 10 years ago • 2 comments

There appears to be an issue when the URL contains a colon, such as "http://localhost:8888/". The colon remains in the filename and in the command line parameters to ImageMagick. This causes problems, at least on Windows.

PHOTOBOX STARTED PHOTO SESSION.
started photo session for http://localhost:8888/#960
>> picture of http://localhost:8888/#960 taken.
>> PHOTOBOX FINISHED PHOTO SESSION SUCCESSFULLY.

NOTE: You defined to use ImageMagick, make sure it is installed.

PHOTOBOX STARTED DIFF GENERATION.
started diff for localhost:8888--960
>> Error: composite.EXE: unable to open image `8888--960.png': No such file or directory @ error/blob.c/OpenBlob/2657.
>> composite.EXE: unable to open file `8888--960.png' @ error/png.c/ReadPNGImage/4021.
>> composite.EXE: unable to open image `8888--960.png': No such file or directory @ error/blob.c/OpenBlob/2657.
>> composite.EXE: unable to open file `8888--960.png' @ error/png.c/ReadPNGImage/4021.
>> composite.EXE: missing an image filename `photobox/img/diff/localhost:8888--960-diff.png' @ error/composite.c/CompositeImageCommand/1613.
>> Error: convert.EXE: unable to open image `8888--960-diff.png': No such file or directory @ error/blob.c/OpenBlob/2657.
>> convert.EXE: unable to open file `8888--960-diff.png' @ error/png.c/ReadPNGImage/4021.
>> convert.EXE: no images defined `photobox/img/diff/localhost:8888--960.png' @ error/convert.c/ConvertImageCommand/3187.
>> PHOTOBOX FINISHED DIFF GENERATION SUCCESSFULLY.

PHOTOBOX STARTED INDEX FILE GENERATION
>> PHOTOBOX CREATED NEW 'index.html' AT 'photobox/'.

AdamBoman avatar Jun 04 '14 08:06 AdamBoman

Adding the code

.replace( /:/g, '-')

to tasks/lib/photobox.js line 86, tasks/lib/photoboxScript.js line 69 and tasks/tpl/magic.tpl line 199 solved the issue for me.

AdamBoman avatar Jun 04 '14 08:06 AdamBoman

Hey, ja well...

The solution is really not good, I took in first place. Should be refactored anyway. But if you would propose PR I could check it on the weekend. :)

stefanjudis avatar Jun 04 '14 08:06 stefanjudis