diff options
Diffstat (limited to 'tests/pixbuf-reftest.c')
-rw-r--r-- | tests/pixbuf-reftest.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/pixbuf-reftest.c b/tests/pixbuf-reftest.c index fd5414618..caf841c6c 100644 --- a/tests/pixbuf-reftest.c +++ b/tests/pixbuf-reftest.c @@ -85,6 +85,28 @@ make_ref_file (GFile *file) result = g_file_new_for_uri (ref_uri); +#ifdef G_OS_WIN32 + /* XXX: The .ref.png files are symlinks and on Windows git will create + * files containing the symlink target instead of symlinks. */ + { + char *contents; + gboolean success; + + success = g_file_load_contents (result, NULL, &contents, NULL, NULL, NULL); + if (success) + { + if (g_str_is_ascii (contents)) + { + GFile *parent = g_file_get_parent (result); + g_object_unref (result); + result = g_file_get_child (parent, contents); + g_object_unref (parent); + } + g_free (contents); + } + } +#endif + g_free (ref_uri); g_free (uri); |