Verified Commit 14f77633 authored by James Westman's avatar James Westman
Browse files

file-cache: Fix bug when updating tiles

When store_tile() was called and the tile already existed in the cache,
it would fail to overwrite it, because it was using
g_file_create_async() instead of g_file_replace_async().
parent 7a80cf63
Pipeline #273010 passed with stage
in 2 minutes and 6 seconds
......@@ -958,7 +958,7 @@ shumate_file_cache_store_tile_async (ShumateFileCache *self,
data->filename = g_steal_pointer (&filename);
g_task_set_task_data (task, data, (GDestroyNotify) store_tile_data_free);
g_file_create_async (file, G_FILE_CREATE_PRIVATE, G_PRIORITY_DEFAULT, cancellable, on_file_created, g_object_ref (task));
g_file_replace_async (file, NULL, FALSE, G_FILE_CREATE_PRIVATE, G_PRIORITY_DEFAULT, cancellable, on_file_created, g_object_ref (task));
}
static void
......
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