screenshot: use g_file_replace() when using an absolute path
Instead of g_file_create(), which always fails if the file exists already.
This commit is contained in:
parent
e96867f757
commit
e4860acb58
@ -153,7 +153,7 @@ prepare_write_stream (const gchar *filename,
|
|||||||
{
|
{
|
||||||
file = g_file_new_for_path (filename);
|
file = g_file_new_for_path (filename);
|
||||||
*filename_used = g_strdup (filename);
|
*filename_used = g_strdup (filename);
|
||||||
stream = G_OUTPUT_STREAM (g_file_create (file, G_FILE_CREATE_NONE, NULL, NULL));
|
stream = G_OUTPUT_STREAM (g_file_replace (file, NULL, FALSE, G_FILE_CREATE_NONE, NULL, NULL));
|
||||||
g_object_unref (file);
|
g_object_unref (file);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user