Commit b33ad570 authored by Saul Ibarra's avatar Saul Ibarra

Fix icon renaming in Windows

parent 9dab43ea
......@@ -14,6 +14,7 @@ from PyQt4.QtCore import Qt
from PyQt4.QtGui import QPixmap
from application import log
from application.python.util import Singleton
from application.system import unlink
from collections import deque
from sipsimple.util import classproperty, makedirs
......@@ -154,6 +155,8 @@ class IconCache(object):
file = open(map_tempname, 'wb')
pickle.dump(self.filemap, file)
file.close()
if sys.platform == 'win32':
unlink(map_filename)
os.rename(map_tempname, map_filename)
except Exception, e:
log.error("could not save icon cache file mappings: %s" % e)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment