Inserted Images are lost when rezipping a ggb file

Fenzo shared this problem 12 years ago
Answered

The ggb file is actually a zip file. Renaming the ggb file to a zip file allows for changing the geogebra.xml file inside to make some global adjustments quickly. Afterwards creating a zip file again and renaming it back to ggb should pose no problem.


However, there is a problem when the ggb file contains an inserted image. Inserted images are stored in a directory inside the ggb file. When the ggb file is extracted as a zip file, and a new zip file is created from the output and renamed to a ggb file, the image is lost! Please try the Test.ggb attachment and TestRezipped.ggb.

Your unzipper will reveal that they have equal contents. Save the opened TestRezipped.ggb from within GeoGebra and the output file will not contain the directory anymore.


Does anyone know a way to create a valid GeoGebra zip/ggb file by some Windows archiving program?

I think this is a bug. Please rewrite the ggb file Loader to accept standard zipfiles. Inserted images should be preserved.

https://ggbm.at/545379


https://ggbm.at/545381

Comments (2)

photo
1

Seems you just have a typo in the image URL (in geogebra.xml, line 71): \ instead of /.

photo
1

Seems you just have a typo in the image URL (in geogebra.xml, line 71): \ instead of /.


Thank you, that seems to have caused the problem! I didn't touch the original geogebra.xml at all, but I suppose the backslash \ in the geogebra.xml file has been inserted by Windows because it's the directory delimiter for Windows. I think the GeoGebra xml loader should correct for this.


Anyway, after changing \ to / the zipped file opened as expected, i.e. including the inserted image.

© 2022 International GeoGebra Institute