From: Michael Banck Subject: Honor umask when saving a gif animation by changing the permissions accordingly afterwards. --- a/src/gifSave.cpp +++ b/src/gifSave.cpp @@ -9,6 +9,8 @@ #include #include +#include +#include #include @@ -181,6 +183,10 @@ if (EGifCloseFile(GifFile) == GIF_ERROR) return false; + mode_t mask = umask(0); + umask(mask); + chmod(filename, mask ^ 0666); + return true; }