Add extension to temp icon file names #458

This commit is contained in:
Tomeu Vizoso 2009-03-01 10:36:42 +01:00
parent f4800ea8c1
commit 50a253b1b9

View File

@ -251,7 +251,7 @@ class ActivityBundle(Bundle):
return os.path.join(self._path, icon_path) return os.path.join(self._path, icon_path)
else: else:
icon_data = self.get_file(icon_path).read() icon_data = self.get_file(icon_path).read()
temp_file, temp_file_path = tempfile.mkstemp(self._icon) temp_file, temp_file_path = tempfile.mkstemp(prefix=self._icon, suffix='.svg')
os.write(temp_file, icon_data) os.write(temp_file, icon_data)
os.close(temp_file) os.close(temp_file)
return util.TempFilePath(temp_file_path) return util.TempFilePath(temp_file_path)