From 0db76b822d69486a63230a0597284f90d593e4b7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Sun, 15 Apr 2012 20:20:29 +0200 Subject: [PATCH] wIconStore(): do not save the icon if it exists The function wIconStore() doesn't write a new file overwriting the previous icon if the icon file exists. --- src/icon.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/icon.c b/src/icon.c index e8382bbd..73dae74f 100644 --- a/src/icon.c +++ b/src/icon.c @@ -473,6 +473,10 @@ char *wIconStore(WIcon * icon) if (!path) return NULL; + /* If icon exists, exit */ + if (access(path, F_OK) == 0) + return path; + if (wwin->net_icon_image) { image = RRetainImage(wwin->net_icon_image); } else if (wwin->wm_hints && (wwin->wm_hints->flags & IconPixmapHint) -- 2.11.4.GIT