#37 Preserve option buggy


This is with 0.7.3:

When preserve is used, OptiPNG still replaces symlinks with actual files. This makes batch-optimization of entire directory trees (like /usr/share/icons on Linux systems) very dangerous. It will also no set the group correctly on newly created files. If I have a file owned by root:games, it will be root:root afterwards..


  • Cosmin Truta

    Cosmin Truta - 2013-11-04

    Ticket moved from /p/optipng/bugs/38/

  • Cosmin Truta

    Cosmin Truta - 2013-11-04

    Thank you very much for your feedback. I moved it to the feature requests section, because it's not a defect, it's merely unimplemented behavior.
    About not setting the group correctly: that's also missing functionality. OptiPNG doesn't currently preserve the UID or the GID.

  • Cosmin Truta

    Cosmin Truta - 2013-11-04
    • assigned_to: Cosmin Truta
    • Group: --> Next Release (example)
  • Cosmin Truta

    Cosmin Truta - 2014-03-24

    Setting the UID and GID is implemented in version 0.7.5.

    About preservation of symlinks: I think the sound approach would be not to do anything except issue an error message. Otherwise, modifying the file pointed by the symlink on a random location on the disk poses a different kind of danger, but still a danger.

    I see that tools like gzip, bzip2, xz, etc. use a similar approach.

    What do you think?

    • haarp

      haarp - 2014-07-14

      I agree, that seems like the most reasonable choice


Log in to post a comment.