+ cache_path = g_build_filename (path, CACHE_NAME, NULL);
+
+opentmp:
+ if ((fd = g_open (tmp_cache_path, O_WRONLY | O_CREAT | O_EXCL | O_TRUNC | _O_BINARY, mode)) == -1)
+ {
+ if (force_update && retry_count == 0)
+ {
+ retry_count++;
+ g_remove (tmp_cache_path);
+ goto opentmp;
+ }
+ g_printerr (_("Failed to open file %s : %s\n"), tmp_cache_path, g_strerror (errno));
+ exit (1);
+ }
+
+ cache = fdopen (fd, "wb");
+